v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Generate Authentication Token

Generate authentication for web application.

post/auth/v1/web/token/generate

Request body

identifierType'MOBILE' | 'EMAIL' | 'USERNAME.' required

Identifier used for token generation

mobilestring

Mobile number of the customer. Either mobile number or email ID is required to authenticate with username.

emailstring

Email ID of the customer. Either mobile number or email ID is required to authenticate with username.

passwordstring required

Password to login to the app.

confirmPasswordstring required

Reenter the password.

brandstring required

Name of the brand/org for which authentication needs to be verified.

deviceIdstring required

Unique ID of the device from which the customer has generated the token.

identifierValuestring required

Identifier value

Response

200

Example response

{
  "status": {
    "success": true,
    "code": 200,
    "message": "SUCCESS"
  },
  "auth": {
    "token": "eyJpZHYiOlsiTU9CSUxFfDk5NDU1NjAyMjQiXSwiZGV2IjoiMzJydHNkZXJlZCIsIm9yZyI6IlNUQU5EQVJEQVBQIiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiJDQVBJTExBUlkgVEVDSE5PTE9HSUVTIiwib2djIjpbIjE1MTA2MHxzYS5kZW1vLnNvbHV0aW9uIl0sImV4cCI6MTU5NzY1NTgxMywiaWF0IjoxNTk3NjUyMjEzLCJyb2wiOiJWSUVXIn0.2LqAg3tDVu8VwasSXuwiL6p917NCxgpKEt76qqrARgQ"
  },
  "user": {
    "sessionId": "D-12c177af-dac7-4383-a0fb-6c09e148af8e",
    "role": "VIEW"
  }
}