Generate 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.

Request Body

NameTypeDescription
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

NameTypeDescription
access_token
string

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

expires_at
string

Access token expiration timestamp in ISO 8601 format.

Status Codes

200Token generated successfully.
405Method not allowed.
422Unprocessable entity.
500
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/api/auth/v1/token \
  --header 'Content-Type: application/json' \
  --data '{
  "client_id": "a17ce30e-f88e-4f81-ada1-c3b4909ed232",
  "client_secret": "abcdefgwei7egyhuggwp39w8rh",
  "grant_type": "client_credentials"
}'

Run this request

200 OK
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "expires_at": "2024-06-28T13:26:06.909140Z"
}
New chat
Responses are generated using AI and may contain mistakes.
Hi! I'm Pine, your AI developer assistant. Ask me anything about Pine Labs APIs, integrations, or troubleshooting.

Tip: you can create a new chat with ⌘ + E