v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Validate Password

Validates the password of an existing user account and generates the access token and key. The token is valid for 15 minutes by default. You can use the key to regenerate token.

post/auth/v1/web/password/validate

Request body

identifierTypestring required

Identifier used for token generation. Values: MOBILE, EMAIL, USERNAME.

identifierValuestring required

Value of the specified identifierType.

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.

sessionIdstring required

Session ID generated through the v1/token/generate API.

passwordstring required

Account password to validate.

Response

200

Example response

{
  "status": {
    "success": true,
    "code": 200,
    "message": "SUCCESS"
  },
  "auth": {
    "token": "eyJpZHYiOlsiTU9CSUxFfDk5NDU1NjAyMjQiXSwiZGV2IjoiZGV2aWNlaWQxIiwib3JnIjoiU1RBTkRBUkRBUFAiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI3Njg4MTYiLCJpc3MiOiJDQVBJTExBUlkgVEVDSE5PTE9HSUVTIiwiaXNjIjoiZmFsc2UiLCJvZ2MiOlsiMTUxMDYwfHNhLmRlbW8uc29sdXRpb24iXSwiZXhwIjoxNTk3OTQzODU1LCJpYXQiOjE1OTc5NDAyNTUsInJvbCI6IlVTRVIifQ.Wyt_xxlqtmMH3lyReO718sDokngYGp_HSLuiBOyaEds",
    "key": "eyJpZHYiOlsiTU9CSUxFfDk5NDU1NjAyMjQiXSwiZGV2IjoiZGV2aWNlaWQxIiwib3JnIjoiU1RBTkRBUkRBUFAiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI3Njg4MTYiLCJpc3MiOiJDQVBJTExBUlkgVEVDSE5PTE9HSUVTIiwiaWF0IjoxNTk3OTQwMjU1LCJyb2wiOiJBVVRIIn0.UKCOU1oFLPsRx5YJRkClIaRVmE1lNDCjuuKQ9nnMdhE"
  },
  "user": {
    "role": "USER",
    "userRegisteredForPassword": true
  }
}