Role too broad for a service key

Moses SkodaVývojář1 min čtení

The API answers 403 Forbidden with this problem. Its type is https://lingo.dev/docs/api/errors/service-key-role-too-broad. See Errors and status codes for the shape every error shares.

Role <id> cannot be given to a service API key: a service key role may only carry engine:read, engine:translate, and this one also grants org:manage_team. Pick a narrower role or create one for the key.

Fields#

Besides the standard type, status, title and detail members, the body carries these fields. The detail text is built from them, so a client can show its own text instead.

FieldType
idstring
permissions("org:manage_team" | "org:manage_billing" | "org:manage_settings" | "org:manage_api_keys" | "org:manage_integrations" | "org:delete" | "org:view_audit_logs" | "engine:read" | "engine:translate" | "engine:create" | "engine:edit" | "engine:delete" | "engine:review_translations" | "org:manage_reviews" | "org:glossary:read" | "org:glossary:edit" | "org:brandvoice:read" | "org:brandvoice:edit" | "org:ruleset:read" | "org:ruleset:edit" | "org:suggestion:read" | "org:suggestion:edit")[]

Example#

json
{
  "detail": "Role <id> cannot be given to a service API key: a service key role may only carry engine:read, engine:translate, and this one also grants org:manage_team. Pick a narrower role or create one for the key.",
  "id": "<id>",
  "permissions": [
    "org:manage_team"
  ],
  "type": "https://lingo.dev/docs/api/errors/service-key-role-too-broad",
  "status": 403,
  "title": "Role too broad for a service key"
}

Returned by#

  • PATCH /v2/service-api-keys/{id}
  • POST /v2/organizations/{orgId}/service-api-keys