API to Generate Token using private client id
Generate authentication token using client secret and private client id
Request Params
Key
Description
Data type
Mandatory
Possible values
client_id
Login to the Payouts Dashboard and fetch the client ID after OTP verification
String
yes
grant_type
Constant value “client_credentials “
String
yes
client_credentials
client_secret
Login to the Payouts Dashboard and fetch the client ID after OTP verification
String
yes
scope
Constant value
String
yes
create_payout_transactions
Example
Test Environment Request:
curl -X POST \
https://uat-accounts.payu.in/oauth/token \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=cf608fdsfe84fd52f94fbc2702e4bb431641c40339991787568773411df368&client_secret=26ec3cc4bc7caaasdf90b006b655582b92ed0116554597942a884c6cb626e3f&scope=create_payout_transactions'
Remember to have the Content-Type set as x-www-form-urlencoded to avoid “invalid request” errors
Response:
{
"access_token": "994as40fd3bee9a0e830b5a5743a93d4f5c32c84f637510b128a7c69586ab8d",
"token_type": "Bearer",
"expires_in": 6351,
"scope": "create_payout_transactions",
"created_at": 1585215909
}
Response Params
Key
Description
access_token
This is a security token. This will be used further in api calls
token_type
Type of token
expire_in
Access token will get expired in return seconds.
scope
allowed scopes in generated security token
created_at
Time of creation in milliseconds
Last updated
Was this helpful?