- Explore Our Product Suite
- Payment Gateway
- Payouts
- Prepaid Cards
- About Prepaid Card
- Key Capabilities
- Getting Started
- APIs
- API Access & Authorization
- Encryption & Decryption Guide
- Auth Token
- Create Card Account
- Create Gift Card
- Create Prepaid Card
- Set Card PIN
- Load Card Balance
- Get Card Account Details
- Generate Card OTP
- View Card Details
- Card Usage Controls
- Get Card Usage Limits
- Request Card Replacement
- Block Card
- Order Physical Card
- Get Card Details
- Get Transaction Details
- Get All Transaction details
- Bharat Connect (BBPS)
- About Bharat Connect
- Invoice Payments
- Invoice
- Payment
- Financing
- Onboarding
- cdNote
- Purchase Order
- webhook-invoice
- webhook-payments
- webhook-business-onboarding
- webhook-financing
- webhook-cdNote
- Webhook Purchase Order
- Webhook Send Purchase Order Request
- Webhook Send Purchase Order Response
- Webhook Confirm Purchase Order Request
- Webhook Confirm Purchase Order Response
- Webhook Edit Purchase Order Request
- Webhook Edit Purchase Order Response
- Webhook Status Change Purchase Order Request
- Webhook Status Change Purchase Order Response
- Bill Payments
- Accounts Payable
- Account Receivable
- Expense Management
- Rewards & Incentives
- Verification Suite
Token API
Developing
POST
/oauth/token
Request
Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Header Params
Content-Type
string
required
Example:
application/x-www-form-urlencoded
Cookie
string
required
Example:
_cfuvid=7CCLyHoOJa2xNTaH_4WyYansrKY1.z2UTK46Y9C6y1o-1740464351061-0.0.1.1-604800000; _cfuvid=XaDRMESmSsZ2.84q0q6E02VcslOznNUwPX1Kg67TUZQ-1740479309936-0.0.1.1-604800000; JSESSIONID=3BB78CC75CEDD150743D7EE2E24722FC
Authorization
string
optional
Example:
••••••
Body Params application/x-www-form-urlencoded
username
string
required
Example:
6982129990
grant_type
string
required
Example:
password
password
string
required
Example:
Test@1234567
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test.your-api-server.com/oauth/token' \
--header 'Cookie: _cfuvid=7CCLyHoOJa2xNTaH_4WyYansrKY1.z2UTK46Y9C6y1o-1740464351061-0.0.1.1-604800000; _cfuvid=XaDRMESmSsZ2.84q0q6E02VcslOznNUwPX1Kg67TUZQ-1740479309936-0.0.1.1-604800000; JSESSIONID=3BB78CC75CEDD150743D7EE2E24722FC' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic Og==' \
--data-urlencode 'username=6982129990' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'password=Test@1234567'
Responses
🟢200Success
application/json
Body
access_token
string
required
token_type
string
required
refresh_token
string
required
expires_in
integer
required
scope
string
required
Example
{"access_token":"P3Dqn26dcUdYQP_11CNZHbyCpNE","token_type":"bearer","refresh_token":"aR8dFcfjUZsa9BoO3WhBDS9OuV0","expires_in":86399,"scope":"read write trust"}