E-Invoice Authentication

21522152

Overview

The API authenticates the user for using E-Invoice APIs.

Endpoint

HTTP Method

Resource

POST

API EndpointAPI Endpoint

Request Body

RAW_BODY

Param

Type

Description

Example

UserName

string

Username of Tax payer as created on E-Invoice portal for API Integration

testuser

Password

string

Password of Tax payer as in E-Invoice portal for API Integration

Password in plain text

AppKey

string

Any random 32 bytes array, generated by user. On converting to String using base 64 encoding will be 44 chars long.

Randomly generated key

ForceRefreshAccessToken

Boolean

The value of this attribute to be set true, if client needs to refresh the token 10 minutes before expiry

true

Once the values are added, Your curl will look something like this

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
}
'

Response

Param

Type

Description

Example

Status

num

Status of the authentication request
(values 1-Success
and 0- Failure)

1

ClientId

string

Client Id

testclientid

UserName

string

User Name

testuser

AuthToken

string

Authorization token

5GGo3hKqPSvbHwRImTjIxeMKQ

Sek

string

Session Encryption Key generated using AES 256(AES/ECB/PKCS7Padding) algorithm. Encrypted () with AppKey

EmLpFzYohZLstcXCSX9C9XIHVLb+QcsjMO1mk+qAjW8hyXmEBQnCAYsmbluFFu+Z

TokenExpiry

string

Token Expiry time.
Date format is ‘yyyy-MM-dd HH:mm:ss ’

2019-11-30 14:18:00


Did this page help you?