> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agd.sa/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth Token

> Get an OAuth token for authentication

### Body

<ParamField body="grant_type" type="string" required>
  The grant type for the OAuth token request. Must be "client\_credentials".
</ParamField>

<ParamField body="client_id" type="string" required>
  Your client ID
</ParamField>

<ParamField body="client_secret" type="string" required>
  Your client secret
</ParamField>

<ParamField body="scope" type="string" required>
  The scope of access requested. Use "\*".
</ParamField>

### Response

<ResponseField name="access_token" type="string">
  The OAuth access token to use for authenticated requests
</ResponseField>

<ResponseField name="token_type" type="string">
  The type of token (usually "Bearer")
</ResponseField>

<ResponseField name="expires_in" type="number">
  Token expiration time in seconds
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl --request POST \
    --url /oauth/token \
    --header 'Content-Type: multipart/form-data' \
    --form 'grant_type=client_credentials' \
    --form 'client_id={{client_id}}' \
    --form 'client_secret={{client_secret}}' \
    --form 'scope=*'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
    "token_type": "Bearer",
    "expires_in": 3600
  }
  ```
</ResponseExample>
