e-Invoice Authentication

Users have to authenticate themselves to call e-Invoice APIs

Overview

Users have to authenticate themselves using their e-Invoice portal credentials to call the e-Invoice APIs

Endpoint

HTTP MethodResource
POST

API Endpoint  Contact Us  Free Trial

Request

Follow the below guidelines to call the API.

Body

ParamTypeDescriptionExample
UserNamestringUsername of Tax payer as created on E-Invoice portal for API Integrationtestuser
PasswordstringPassword of Tax payer as in E-Invoice portal for API IntegrationPassword in plain text
AppKeystringAny random 32 bytes array, generated by user. On converting to String using base 64 encoding will be 44 chars long.Randomly generated key
ForceRefreshAccessTokenBooleanThe value of this attribute to be set true, if client needs to refresh the token 10 minutes before expirytrue

Sample CURL Request

curl --request POST \
     --url https://api.sandbox.co.in/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-api-version: 1.0' \
     --data '
{
     "UserName": "testuser",
     "Password": "<Password in plain text >",
     "AppKey": "<Randomly generated key>",
     "ForceRefreshAccessToken": true
}
'

❗️

Test Environment Not Available

Response

ParamTypeDescriptionExample
StatusnumStatus of the authentication request
(values 1-Success
and 0- Failure)
1
ClientIdstringClient Idtestclientid
UserNamestringUser Nametestuser
AuthTokenstringAuthorization token5GGo3hKqPSvbHwRImTjIxeMKQ
SekstringSession Encryption Key generated using AES 256(AES/ECB/PKCS7Padding) algorithm. Encrypted () with AppKeyEmLpFzYohZLstcXCSX9C9XIHVLb+QcsjMO1mk+qAjW8hyXmEBQnCAYsmbluFFu+Z
TokenExpirystringToken Expiry time.
Date format is ‘yyyy-MM-dd HH:mm:ss ’
2019-11-30 14:18:00

Response Caching

Response caching is not available for this API. Learn more about our response caching mechanism here

Wallet Charges

Since E-Invoice Authentication API is a Paid API, a wallet charge will take place.

Versioning

This API is currently in major version 1.0. Refer to our versioning policies here