Generate Token
POST
/api/auth/v1/tokenGenerate 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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
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
200 | Token generated successfully. |
405 | Method not allowed. |
422 | Unprocessable 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"
}