Use this for "you are logged in but cannot do this" — the user is authenticated but lacks the required role or permission. Include the missing permission so the UI can show a helpful message.
Example JSON
Returned when the user is authenticated but unauthorised for the resource.
{
"status": 403,
"error": "Forbidden",
"message": "You do not have permission to perform this action",
"code": "permission_denied",
"requiredPermission": "products:write"
}
Request examples
const res = await fetch('https://jsonexamples.com/http/403/Forbidden');
if (!res.ok) {
const err = await res.json();
console.error(res.status, err.message);
}