Skip to content
Dashboard
Theme
Theme

api_key_organization_forbidden

Developer and IT administrator messages for api_key_organization_forbidden.

View Markdown

Since API version 1.0.

Field Value
Type permission
Status 403
Surfaces api
Retryable No

The request was made with an API key limited to one organization, and the route either names another organization or does not name one at all. An organization key may call routes with {org} in the path and the list routes that filter by an organization query parameter, with its own organization in that place. Routes that reach a resource by its ID alone (a connection, directory, user, passkey, M2M client, webhook endpoint or import switch) are refused for organization keys, because the ID does not prove which organization the resource belongs to.

  • The path or the organization query parameter names a different organization than the key’s.
  • The route is an ID-only route such as GET /v1/connections/{conn} or PATCH /v1/users/{user}.
  • A list route was called without organization=<the key's organization>.
  • The route reads organization from the query but does not filter by it, so the parameter does not count.
  • For lists, add organization=<org_id> with the key’s own organization, for example GET /v1/connections?organization=org_....
  • For ID-only routes, use an environment-wide secret key on your server; keep organization keys for work that names its organization.
  • See organization-scoped API keys for the full list of allowed routes.
  • Ask the app’s team to use a key that covers this organization.

HTTP status 403 when an organization key reads a connection by ID:

{
"error": {
"type": "permission",
"code": "api_key_organization_forbidden",
"message": "The key is limited to one organization and this request is outside it",
"doc_url": "https://docs.ohauthcat.com/errors/api_key_organization_forbidden",
"request_id": "req_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
}
}

The key is limited to one organization and this request is outside it

This key can’t access that organization

The hosted portal shows these machine translations, which native speakers have not reviewed yet. Placeholders and identity provider console labels stay in English.

  • de: Dieser Schlüssel hat keinen Zugriff auf diese Organisation
  • es: Esta clave no puede acceder a esa organización
  • fr: Cette clé ne peut pas accéder à cette organisation
  • ja: このキーではその組織にアクセスできません
  • pt-BR: Esta chave não pode acessar essa organização

Security invariants: 57.