Skip to main content

Invalid token

typehttps://docs.frem.sh/reference/api/errors/invalid-token
HTTP status401 Unauthorized

What it means

Authentication is missing, or the credential was rejected.

Example detail messages returned with this error:

  • External-IdP JWT bearer not enabled on this deployment.
  • Forgejo OAuth bearer not enabled on this deployment.
  • Forgejo OAuth bearer rejected by introspection.

What to do

The credential was rejected. Check it has not been revoked or expired, and that you are sending Authorization: token <value> for a PAT or Bearer <jwt> for an OIDC token.

Response shape

All fremforge API errors are RFC 9457 problem+json:

{
  "type": "https://docs.frem.sh/reference/api/errors/invalid-token",
  "title": "Unauthorized",
  "status": 401,
  "detail": "..."
}

Branch on type, not on title or detail - those are human-readable and may be reworded.