HTTP 403 Forbidden

The server knows who you are and is refusing anyway. Authentication succeeded; authorization did not.

Defined in RFC 9110 §15.5.4 — 403 Forbidden · MDN reference

Where you meet HTTP 403 in production

A reader trying to write, a tenant reaching for another tenant's data, a request from a blocked region, a valid token missing a scope.

Why you would test it

The 401-versus-403 distinction is the single most common auth bug. Test the same endpoint with no token, a valid read-only token and an admin token, and assert all three.

What your client should do about a 403

Do not retry, and do not re-authenticate — the credential is fine. Re-authenticating on a 403 is a common and costly bug: it turns a clean permission error into a login storm. Show the user what they lack, or fail the operation.

403 versus the codes it gets confused with

Endpoints that return 403

24 endpoints in this playground answer with 403. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 403

Should a 403 explain why?
Enough for a legitimate caller to act on, and no more — an over-detailed 403 can leak the shape of the permission model.
Can a 403 ever be fixed by retrying?
Only if permissions changed in between. As a client behaviour, treat it as terminal.

Other client error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated