Skip to main content
POST
/
v1
/
token
Generate Access Token
curl --request POST \
  --url https://api.casparser.in/v1/token \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "expiry_minutes": 60
}
'
{
  "access_token": "at_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "api_key",
  "expires_in": 3600
}

Authorizations

x-api-key
string
header
required

Your API key for authentication. Use sandbox-with-json-responses as Sandbox key.

Body

application/json
expiry_minutes
integer
default:60

Token validity in minutes (max 60)

Required range: 1 <= x <= 60
Example:

60

Response

Access token generated successfully

access_token
string

The at_ prefixed access token

Example:

"at_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

token_type
string

Always "api_key" - token is a drop-in replacement for x-api-key header

Example:

"api_key"

expires_in
integer

Token validity in seconds

Example:

3600