forbidden

The message text is shown in the example below.

HTTP status403
typepermission_error
Retry?No, not unchanged
StatusIn the public catalog (error-envelope.ts)
Extra fieldsnone

When it happens

The credential is valid but is not allowed to make this request, and no more specific reason applies.

Example

{
  "error": {
    "type": "permission_error",
    "code": "forbidden",
    "message": "This credential is not allowed to perform this request.",
    "param": null,
    "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
  }
}

How to fix it

  • Check that the key belongs to the workspace and organization you expect.
  • If a more specific code would help you, send the request_id to support.

Detect it in code

err = resp.json().get("error", {})
if resp.status_code == 403 and err.get("code") == "forbidden":
    log.warning("%s (%s)", err["message"], err["request_id"])  # fix the request; do not retry unchanged
Was this page helpful?