Enkash Developer Portal
Home
Home
Login
  1. Home
  • Back to home
  • Expense APIs
  • Token API
    POST
  • Expenses
    POST
  • Advance
    POST
  1. Home

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"}
Modified at 2025-07-07 18:38:44
Next
Expenses
Built with