---
agentTools:
  projectIndex: https://docs.xkit.co/llms.txt
---

# Authorization

A user's granted authorization to access a 3rd party service

[block:parameters]
{
  "data": {
    "h-0": "Attribute",
    "h-1": "Description",
    "0-0": "**id**\n*number* or *string*",
    "0-1": "The unique identifier for this authorization. A single authorization corresponds to a single grant by the user to access the accompanying resource.",
    "1-0": "**status**\n*string*",
    "1-1": "One of `awaiting_callback`, `retrieving_tokens`, `active`, or `error`",
    "4-0": "**authorizer**\n*[Authorizer](https://docs.xkit.co/reference/authorizer)*",
    "4-1": "The authorizer that this authorization used to be granted access.",
    "5-0": "**access_token**\n*string* (optional)",
    "5-1": "If available, the current token to access the resource (e.g. the current OAuth2 access token).\n\nOnly available if `status` is `active`.",
    "6-0": "**authorize_url**\n*string* (optional)",
    "6-1": "The URL the user needs to visit in order to grant access to the resource.\n\nOnly available if the `status` is `awaiting_callback`.",
    "2-0": "**error_code**\n*string*",
    "2-1": "For authorizations in the `error` state, denotes the code (category) of the error, e.g. `invalid_credentials`.",
    "3-0": "**error_message**\n*string*",
    "3-1": "For authorizations in the `error` state, the user-friendly error message, e.g. \"Installation failed (request error).\""
  },
  "cols": 2,
  "rows": 7
}
[/block]