POST
/v1/auth/totp/signup

Sign-up new end user via TOTP

Initiate a TOTP sign-up process for a new end user. Descope will generate a TOTP key (also called a secret or seed) that will be entered into the end user's authenticator app so that TOTP codes can be successfully verified. The new end user will be registered after the full TOTP sign-up flow has successfully completed.

If the end user is already registered use the add/update endpoint to add TOTP funtionality to an existing end user, to prevent the same person being registered twice.

Next Steps

  1. Display the TOTP key so it can be entered into their authenticator app. The TOTP key is returned in the response object in three ways, to ensure it can easily be entered into the end user's authenticator app.
  2. Prompt the end user user for a TOTP code generated by their authenticator app.
  3. Verify the TOTP code using the Sign-In / Verify endpoint to complete the sign-in process. After successfully verifying the TOTP code the new end user will be registered using the details you provided in the body of this endpoint.

See Also

  • See The User Object for further details on how to identify users and their contact information such as email addresses and phone number.
  • Use the add/update endpoint to add TOTP funtionality to an existing end user.

Endpoint Authentication

Use authorization bearer header with the following format:

Authorization: Bearer \<Project ID\>

Try it

/v1/auth/totp/signup

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

loginIdstring

userobject

ssoAppIdstring

Status codeDescription
200OK
curl -X POST "https://api.descope.com/v1/auth/totp/signup" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <Project ID>" \
  -d '{
  "loginId": "string",
  "user": {
    "loginId": "string",
    "name": "string",
    "phone": "string",
    "email": "string",
    "givenName": "string",
    "middleName": "string",
    "familyName": "string"
  },
  "ssoAppId": "string"
}'

{
  "provisioningURL": "string",
  "image": "string",
  "key": "string"
}

Was this helpful?