Skip to main content
POST
/
oauth
/
token
Generate access token
curl --request POST \
  --url https://api.yuvexpay.com/oauth/token \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "cred_abc123",
  "client_secret": "secret_xyz789",
  "grant_type": "client_credentials"
}
'
{
  "access_token": "ypt_abc123example",
  "token_type": "Bearer",
  "expires_in": 3600,
  "company_id": "comp_abc123",
  "company_name": "My Store"
}

Body

application/json
client_id
string
required

Your API client ID, found in the dashboard under API credentials.

client_secret
string
required

Your API client secret.

grant_type
enum<string>
required

Must be client_credentials.

Available options:
client_credentials

Response

Token generated successfully.

access_token
string

The Bearer token to use in API requests. Access tokens are prefixed with ypt_.

token_type
enum<string>
Available options:
Bearer
expires_in
integer

Token validity in seconds (3600 = 1 hour).

company_id
string

The company ID associated with this token.

company_name
string

The company name.