Regenerate Authentication Token

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

Example request

curl --location 'https://eu.api.capillarytech.com/auth/v1/token/regenerate' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Cookie: _cfuvid=Ot3GURj_wgib7uz.8f4SW6vyut.8YIVFkWCyvT.QyuE-1760089512848-0.0.1.1-604800000' \
--data '
{
  "identifierType": "MOBILE",
  "identifierValue": "919999922332",
  "brand": "DocDemo",
  "deviceId": "deviceid1",
	"key":"eyJpZHYiOlsiTU9CSUxFfDkxOTk5OTkyMjMzMiJdLCJkZXYiOiJkZXZpY2VpZDEiLCJvcmciOiJET0NERU1PIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOiI0NDEyNDU4IiwiaXNzIjoiQ0FQSUxMQVJZIFRFQ0hOT0xPR0lFUyIsIm1mYSI6ZmFsc2UsImlhdCI6MTc2MDM1MzAyNSwicm9sIjoiQVVUSCJ9.ArsBygaS9m5cgRihZYtLyorkuvSyIK0aMOVPnErHZKI"
}
'
curl --location 'https://eu.api.capillarytech.com/auth/v1/web/token/regenerate' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Cookie: _cfuvid=Ot3GURj_wgib7uz.8f4SW6vyut.8YIVFkWCyvT.QyuE-1760089512848-0.0.1.1-604800000; _cfuvid=xG1SSpjArOPbwu586VvrxV5Lb82NDs_YTMtn6I96TjE-1760358400850-0.0.1.1-604800000' \
--data '
{
  "identifierType": "MOBILE",
  "identifierValue": "919999922332",
  "brand": "DocDemo",
  "deviceId": "deviceid1",
  "expiredToken":"eyJpZHYiOlsiTU9CSUxFfDkxOTk5OTkyMjMzMiJdLCJkZXYiOm51bGwsIm9yZyI6IkRPQ0RFTU8iLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI0NDEyNDU4IiwiaXNzIjoiQ0FQSUxMQVJZIFRFQ0hOT0xPR0lFUyIsImlzYyI6ImZhbHNlIiwib2djIjpbIjEwMDczN3xuZWVyYWouZG9jIl0sImV4cCI6MTc2MDM2NDE0MiwiaWF0IjoxNzYwMzUzMzQyLCJyb2wiOiJVU0VSIn0.Y_bFGVIrxlFLJGABIg-VSVE9ubyoin9XGFboPq44xys"
}
'

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**stringExpired web token. It is the unique token generated during successful web OTP or password validation.

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

Example response

{
    "status": {
        "success": true,
        "code": 200,
        "message": "SUCCESS"
    },
    "auth": {
        "token": "eyJpZHYiOlsiTU9CSUxFfDkxOTk5OTkyMjMzMiJdLCJkZXYiOiJkZXZpY2VpZDEiLCJvcmciOiJET0NERU1PIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOiI0NDEyNDU4IiwiaXNzIjoiQ0FQSUxMQVJZIFRFQ0hOT0xPR0lFUyIsImlzYyI6ImZhbHNlIiwib2djIjpbIjEwMDczN3xuZWVyYWouZG9jIl0sImV4cCI6MTc2MDM1NjY5MSwiaWF0IjoxNzYwMzUzMDkxLCJyb2wiOiJVU0VSIn0.hb_3vb2Txm-V3LOSFsB7WVdMA9zeYoTXC4xFSw5LVlc",
        "key": null
    },
    "user": {
        "appRegistered": false,
        "sessionId": null,
        "role": "USER",
        "userRegisteredForPassword": true
    }
}
{
    "status": {
        "success": true,
        "code": 200,
        "message": "SUCCESS"
    },
    "auth": {
        "token": "eyJpZHYiOlsiTU9CSUxFfDkxOTk5OTkyMjMzMiJdLCJkZXYiOm51bGwsIm9yZyI6IkRPQ0RFTU8iLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI0NDEyNDU4IiwiaXNzIjoiQ0FQSUxMQVJZIFRFQ0hOT0xPR0lFUyIsImlzYyI6ImZhbHNlIiwib2djIjpbIjEwMDczN3xuZWVyYWouZG9jIl0sImV4cCI6MTc2MDM1ODYwNiwiaWF0IjoxNzYwMzU4NTE2LCJyb2wiOiJVU0VSIn0.ItIkocenPtaOgjkRGdB52uHLj3VRz5uBHrCco88keaM",
        "key": null
    },
    "user": {
        "appRegistered": false,
        "sessionId": null,
        "role": "USER",
        "userRegisteredForPassword": false
    }
}

Error code

Error codeSolution
1597 Key expired or not validMake sure that the key is valid.
Body Params
string
required
string
required
string
required
string
required
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json