Masters India APIs
Product DocWebsite
  • APIs documentation.
  • Environment
  • Auth API
  • SIM Tracking API
    • Add Driver
    • Driver Consent
    • Driver Location
    • Bulk Driver Location
    • Delete Driver
  • Proof of Delivery (POD) API
    • Introduction
    • Driver License API
    • Fastag API
    • Fastag API 02
    • Vehicle e-Challan
    • Vahan API - Vehicle Detail API (RC)
  • Invoice OCR API
    • Introduction
    • OCR Tax Invoice API
    • OCR QR Code API
    • OCR Delivery Order API
    • OCR BOE API
  • Vendor Verification API
    • MCA Status API
  • IRN APIs
    • Auth API
    • IRN List API
    • IRN Detail API
Powered by GitBook
On this page
  • ​Access Tokens
  • Auth API

Was this helpful?

  1. IRN APIs

Auth API

PreviousMCA Status APINextIRN List API

Last updated 10 months ago

Was this helpful?

​Access Tokens

This page shows how to get the access token using the authentication credentials. Masters India supports access-token-based authentication. once a user hits the login button, our API generates an access_token and a refresh token for a user after validating his credentials.API - This token needs to be passed in the subsequent requests to avoid permission or access issues.

To generate the Authorization token by clicking on the Send button. Once the Token Is generated. We need the token in the Authorization header with the prefix JWT so the token will be passed as JWT <token>The Access token key can be used in subsequent requests but expires after 24 hours which must be requested again by re-initiating a login or calling the token-refresh API. The Access token once generated is valid for 24 hours and the refresh token is valid for many days. Auth API

Auth API

Name
Description

API Name

Authentication

URL

​​

Method Type

POST

Headers

Leave Blank

Body

Select form-data

Key
Value

Action

Hit the Send button

Response

{"token": "eyJ0eXfiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjk5NjEzODQzLCJqdGkiOiJmYTBkNDRhZmQyNmQ0NjAzOTM3MjY1ZThlMTAxNTI1YyIsInVzZXJfaWQiOjE0OCwidXNlcm5hbWUiOiJwcmF0ZWVrcmFpK2RlbW9AbWFzdGVyc2luZGlhLmNvIiwiZW1haWwiOiJwcmF0ZWVrcmFpK2RlbW9AbWFzdGVyc2luZGlhLmNvIiwicmVmcmVzaF9qdGkiOiJiMjYzZjkxNWI1ZDA0NjQ4OGVmOTgzN2E3YmM0ZmFiNSJ9.cAL8mxY12ncSjq3nhhvwHtWKihRaT8YYBY1RrQ5t7_M",

"refresh token": "eyo0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcwMjIwNTg0MywianRpIjoiYjI2M2Y5MTViNWQwNDY0ODhlZjk4MzdhN2JjNGZhYjUiLCJ1c2VyX2lkIjoxNDgsInVzZXJuYW1lIjoicHJhdGVla3JhaStkZW1vQG1hc3RlcnNpbmRpYS5jbyIsImVtYWlsIjoicHJhdGVla3JhaStkZW1vQG1hc3RlcnNpbmRpYS5jbyJ9._3GKwWNN5eAd3xvrRq6YmTRiYE1u8aLwXuRkp9joD6Q"}

JWT token will get Generated - Copy & paste it In the header section of Upload API

Messages

Code
Text
MSG

200

Sueess

Data Extracted Successfully

206

error

(Invalid Credentials)

400

error

(Invalid Params)

username

abc@gmail.com

password

ABC@123

https://api-platform.mastersindia.co/api/v2/token-auth/