Get Access Token

This authentication endpoint takes the client_id and client_secret and returns an access token.

The access token returned by this endpoint should be used as a bearer token in the 'Authorization' header for any subsequent Carriyo API endpoints.

The access token should be cached on the client side until its expiry.

Request
Request Body schema: application/json
required

OAuth Request (to get access token)

client_id
required
string

The client ID generated in the Carriyo Dashboard

client_secret
required
string

The client secret generated in the Carriyo Dashboard

Responses
200

Success Response

403

Error Response

post/oauth/token
Request samples
application/json
{
  • "client_id": "<YOUR-CLIENT-ID>",
  • "client_secret": "<YOUR-CLIENT-SECRET>"
}
Response samples
application/json
{
  • "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL",
  • "scope": "tenant:TEST merchant:ACCOUNT read:shipments create:shipments update:shipments",
  • "expires_in": 86400,
  • "token_type": "Bearer"
}