Regenerate Authentication Token

Generates authentication token using auth key or expired token generated in otp/validate API. By default, a token is valid for 15 minutes. You can use this API only for orgs in which password based authentication is enabled.

Resource Information

URI for Mobile App/auth/v1/token/regenerate
URI for Web App/auth/v1/web/token/regenerate
Rate Limited?Yes
HTTP MethodPOST
AuthenticationNo
Batch SupportNo

Request URL

For mobile application:

http://{ae-host}/auth/v1/token/regenerate

For web application:

http://{ae-host}/{auth}/v1/web/token/regenerate

Request Body Parameters

ParameterDatatypeDescription
identifierType*enumIdentifier used for token generation. Values: MOBILE, EMAIL, USERNAME.
identifierValue*stringValue of the specified identifierType. For example, if identifierType is MOBILE, the identifierValue is mobile number.
deviceId*stringUnique ID of the device from which the customer has generated the token.
brand*stringName of the brand or org for which authentication needs to be verified.
mobile**stringMobile number of the customer. Either mobile number or email ID is required to authenticate with username.
email**stringEmail ID of the customer. Either mobile number or email ID is required to authenticate with username.
key**stringUnique key generated for the successful mobile app OTP validation. If the key expiry configuration is enabled, make sure that the unique key is valid and not expired. The API throws an error if the key is expired. For information on configuring the expiry time for the key, refer to the documentation on the configurations.
expiredToken**stringUnique key generated for the successful web OTP validation.

Parameters marked with * are mandatory and the ones marked with ** are required when the identifierType is USERNAME.

Error code

Error codeSolution
1597 Key expired or not validMake sure that the key is valid.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!