Learn about the type of authentication used by us and how to generate your access token.

When processing an API, it is important to know who is sending the request and if they have permission to perform the action. API authentication helps us identify who is making the call, if they have the required permissions, and ensure you securely access the requested data.

Plural uses bearer tokens to authenticate our API calls. All API calls must include an authorization header in the request.

--header 'Authorization: Bearer <access_token>'
const options = {
  headers: {
    Authorization: 'Bearer <access_token>'
  }
};
request["Authorization"] = 'Bearer <access_token>'
curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <access_token>"
  ],
]);
headers = {
    "Authorization": "Bearer  <access_token>"
}

📘

API Calls via Server Only

  • All API calls should be requested from your backend server only.

Generate API Key

Use our Generate Token API to generate the access token and use this access token to authenticate Plural APIs.

Use the below endpoint to generate the access key.

POST: https://pluraluat.v2.pinepg.in/api/auth/v1/token
POST: https://api.pluralpay.in/api/auth/v1/token

Shown below is a sample request and sample response for a Generate Token API.

{
  "client_id": "a17ce30e-f88e-4f81-ada1-c3b4909ed232",
  "client_secret": "abcdefgwei7egyhuggwp39w8rh",
  "grant_type": "client_credentials"
}
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "expires_at": "2024-08-28T15:00:12.213Z"
}
Response Parameters

The table below lists the various parameters returned in our Generate Token API.

ParameterTypeRequirement TypeDescription
access_tokenstringMThe access token generated by the system.
  • Minimum length: 1 character.
  • Maximum length: 8192 characters.
Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Note: Use this token in the authorization headers to authenticate Plural APIs.
expires_atstringMAccess duration timestamp.

Example: 2024-06-28T13:26:06.909140Z

Learn more about our Generate Token API documentation.