err:unkey:authorization:forbiddendetail gives the reason.
Example response
Likely causes
- Your root key has expired. The message starts with
The provided root key is invalid.and then gives the expiry. - On
portal.createSession, the portal is disabled:Portal is disabled. - On
portal.createSession, the portal can’t serve sessions because the app has no active deployment, the app’s gateway policies don’t verify keys, or the portal’s API was deleted. The message starts withPortal is not available. - You called
portal.createSessionwith a dashboard session or a portal token:Portal sessions can only be created with a root key. - You called a portal-only endpoint without a portal session:
This endpoint is only accessible with a portal session. - Your dashboard organization has no usable workspace:
Your organization does not have an active workspace.
How to fix
- For an expired root key, create a new one. Use one without an expiry for server-to-server calls.
- For portal messages, turn the portal on, deploy the app, or add a key verification policy to the app’s gateway, then retry.
- For a portal-only endpoint, send the portal session instead of a root key. For
portal.createSession, use a root key. - For a dashboard session without a workspace, finish setting up the workspace in the dashboard.
Related errors
err:unkey:authorization:insufficient_permissions: a specific permission is missing.err:unkey:authorization:key_disabled: the root key is disabled.err:unkey:authorization:workspace_disabled: the workspace is disabled.