Generate MFA token

Generates MFA token for devices.

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

This API generates the MFA token using the device ID, customer identifier type, value, and the token generated from OTP validation in the primary flow. See Validate OTP in First factor flow.

Example cURL request

curl --location 'https://eu.api.capillarytech.com/auth/v1/mfa/token/generate' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuvid=TQelvcvKiKe5DWhd.tGG6g.Hq0IJI4FnRacxB4UYCyI-1716799831120-0.0.1.1-604800000' \
--data '{
   "identifierType":"MOBILE",
   "identifierValue":"18795774754",
    "deviceId": "1234",
    "brand": "Bukl",
    "authorizedToken":"eyJpZHYiOlsiTU9CSUxFfDE4Nzk1Nzc0NzU0Il0sImRldiI6IjEyMzQiLCJvcmciOiJCVUtMIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOiIxNzc2NDI4IiwiaXNzIjoiQ0FQSUxMQVJZIFRFQ0hOT0xPR0dJRVMiLCJpc2MiOiJmYWxzZSIsIm9nYyI6WyIxMDA0NTh8YnVrbC5pbmQuc29sdXRpb24iXSwiZXhwIjoxNzE2ODkzNDc3LCJpYXQiOjE3MTY4ODk4NzcsInJvbCI6IlVTRVIifQ.yGDKE9uFYx_UdCfQNG8lDHVqr1VBjcIzZa1vxdsO97o"
}'

Prerequisites

  • Your organisation has enabled MFA.
  • Validation of OTP from the primary or First factor flow.

Resource information

URIauth/v1/mfa/token/generate
HTTP methodPOST
Pagination supported?NA
Rate limitNA
Batch supportNA

Request body parameters


Parameter (Parameters marked with * are mandatory)Data TypeDescription
identifierType*EnumIdentifier used for MFA token generation. Values: MOBILE, EMAIL, USERNAME, EXTERNALID.
identifierValue*StringValue of the identifier.
deviceId*StringUnique ID of the device from which the customer generates the token.
brand*StringName of the brand or organization that needs verification.
authorizedToken*StringAuthentication token from /otp/validate of First factor.

Response parameters

ParameterData TypeDescription
statusobjectObject containing status information.
  • success
booleanBoolean indicating the status of the request.
  • code
integerHTTP status code indicating the result. Example: 200 indicates success.
  • message
stringMessage describing the status of the request.
authobjectObject containing authentication details.
  • token
stringString representing the authentication token. By default, the token is valid for 15 minutes.
  • key
stringString representing the authentication key.
userobjectObject containing user details.
  • appRegistered
booleanIndicates if the user is registered in the app.
  • sessionId
stringCurrent session ID for MFA flow. The session ID is valid for 15 minutes by default.
  • role
stringIndicates the user's role. Example: VIEW, USER.
  • userRegisteredForPassword
booleanIndicates if the user is registered for a password.

{
    "status": {
        "success": true,
        "code": 200,
        "message": "SUCCESS"
    },
    "auth": {
        "token": "eyJpZHYiOlsiTU9CSUxFfDE4Nzk1Nzc0NzU0Il0sImRldiI6IjEyMzQiLCJvcmciOiJCVUtMIiwiYWxnIjoiSFMyNTYifQ.eyJpc3MiOiJDQVBJTExBUlkgVEVDSE5PTE9PR0lFUyIsIm9nYyI6WyIxMDA0NTh8YnVrbC5pbmQuc29sdXRpb24iXSwiZXhwIjoxNzE2ODkwODIyLCJpYXQiOjE3MTY4ODk5MjIsInJvbCI6IlZJRVcifQ.nL6iCjXIrfEb02uDnnJTyj0uPi8teQjAgnQPVU0_aqQ",
        "key": null
    },
    "user": {
        "appRegistered": false,
        "sessionId": "P-a2996f83-a72d-405c-aa23-0eed7a7dba1e",
        "role": "VIEW",
        "userRegisteredForPassword": false
    }
}
Body Params
string
enum
required

Identifier used for MFA token generation.

Allowed:
string
required

Value of the identifier.

string
required

Unique ID of the device from which the customer generates the token.

string
required

Name of the brand or organisation that needs verification.

string
required

Authentication token from /otp/validate\ of First factor.

Responses

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