Pine LabsDOCS

Generate API Access Token

POST/api/auth/v1/token

Generate an API access token using client credentials. This token is required in the Authorization header for all other API calls. This API is authenticated using the client secret provided in the request body.

Header Parameters

FieldDetails
Request-Timestamp
stringdate-time

ISO 8601 UTC timestamp of the request. Used for idempotency and audit.

Request-ID
string

Use a global unique identifier [GUID] for the request.

Constraints
Minimum length: 1 characterMaximum length: 50 characters

Request Bodyrequired

FieldDetails
client_id
stringrequired

Unique client identifier provided during merchant onboarding.

client_secret
stringrequired

Client secret key provided during merchant onboarding.

grant_type
stringrequired

OAuth2 grant type.

Response

FieldDetails
access_token
string

The access token generated by the system. Use in Authorization headers.

Constraints
Minimum length: 1 characterMaximum length: 8192 characters
expires_at
stringdate-time

Access token expiration timestamp in ISO 8601 format.

Status Codes

200Token generated successfully.
405Method not allowed.
422Unprocessable entity.
500An unexpected error occurred on the server.
Run
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/api/auth/v1/token \
  --header 'Content-Type: application/json' \
  --header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Request-Timestamp: 2024-10-01T10:30:00Z' \
  --data '{
  "client_id": "a17ce30e-f88e-4f81-ada1-c3b4909ed232",
  "client_secret": "abcdefgwei7egyhuggwp39w8rh",
  "grant_type": "client_credentials"
}'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "expires_at": "2024-06-28T13:26:06.909140Z"
}