Sobes.tech
Junior — Middle

What HTTP response code is indicated when a user does not have permission to access the requested resource?

sobes.tech AI

Answer from AI

When a user does not have permission to access the requested resource, the HTTP server typically returns a 403 Forbidden status code. This code indicates that the server understood the request but refuses to authorize it due to lack of access rights.

Example usage in C# with ASP.NET Core:

return Forbid(); // Returns HTTP 403
What HTTP response code is indicated when a user does… - sobes.tech