Enkash Developer Portal
Home
Home
Login
  1. Expense Management
  • Explore Our Product Suite
  • Payment Gateway
    • Set Up Payment Gateway
    • Payment Options
    • Easy API Setup
    • APIs - Payment Gateway
  • Payouts
    • Set Up Payouts
    • APIs - Payout
  • Prepaid Cards
    • Key Capabilities
    • Set Up Prepaid Cards
    • KYC Status Handling Guide
    • T&C Acceptance Flow
    • APIs - Prepaid Card
  • Wallet
    • APIs - Wallet
  • Bharat Connect (BBPS)
    • APIs - BBPS
  • Accounts Payable
    • APIs - Accounts Payable
  • Account Receivable
    • Accounts Receivable Overview
    • APIs - Account Receivable
  • Expense Management
    • About Authorization
    • APIs - Expense
    • Partner Integeation
  • Rewards & Incentives
    • About Rewards
    • Getting Started
    • Encryption & Decryption Guide
    • Reward Allocation
    • Incentive Allocation
    • APIs - Reward
  • Petty Cash
    • Request Encryption Using AES
    • API - Petty Cash
  • Verification Suite
    • Verification Suite Overview
    • APIs - Verification Suite
Home
Home
Login
  1. Expense Management

About Authorization

Get Authorization Token API#

The Get Authorization Token API is a critical step for authenticating all subsequent API requests. This token ensures secure communication by verifying the legitimacy of the requesting source.

Purpose#

The API generates an authentication token that must be included in the headers of all subsequent API requests. This token acts as proof of authorization and helps maintain secure interactions with Enkash servers.

Endpoint:#

EnvironmentEndpoint URL
Testhttps://ekpayout-uat.enkash.in/oauth/token
Method: POST

Request Headers:#

Include the following headers in your API request
HeaderValueDescription
Content-Typeapplication/jsonSpecifies the media type of the request body.
API-KeyYour unique API keyProvided by Enkash upon registration.

Sample Request:#

curl --location 'https://ekpayout-uat.enkash.in/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic ZW5rYXNoLWNsaWVudDplbmthc2gtc2VjcmV0' \
--header 'Cookie: _cfuvid=yGxHvg3YoXDw5.TqhyNajXB5rfz3FgUUHcHaZl3G_i0-1740119862393-0.0.1.1-604800000' \
--data-urlencode '[email protected]' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'password=Test@1234' 

Response:#

Upon a successful request, the server will return a JSON object containing the generated token and additional details:
FieldTypeDescription
tokenstringThe generated authentication token
expiryinteger (int64)Token expiration time in milliseconds
resultCodeinteger (int32)Status code indicating the outcome of the token generation request
resultMessagestringAdditional information about the request's result

Sample Response:#

{  
  "token": "abcdef1234567890",  
  "expiry": 1672531199000,  
  "resultCode": 200,  
  "resultMessage": "Token generated successfully."  
}  

Integration Notes#

The token must be included in the Authorization header for all subsequent API requests:
Authorization: Bearer {token}  
Ensure that you handle token expiration by refreshing the token before its expiry time.

Related Pages:#

Get Authorization Token
Modified at 2025-05-23 11:35:44
Previous
Expense Management
Next
APIs - Expense
Built with