Skip to main content
POST
https://app-stage.agdejar.sa
/
oauth
/
token
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=*'
{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Body

grant_type
string
required
The grant type for the OAuth token request. Must be “client_credentials”.
client_id
string
required
Your client ID
client_secret
string
required
Your client secret
scope
string
required
The scope of access requested. Use ”*”.

Response

access_token
string
The OAuth access token to use for authenticated requests
token_type
string
The type of token (usually “Bearer”)
expires_in
number
Token expiration time in seconds
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=*'
{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
  "token_type": "Bearer",
  "expires_in": 3600
}