POST
/v1/mgmt/tests/generate/otp

Generate an OTP verification code for a test user.

This endpoint is used to generate an OTP verification code for a test user. You can define whether this is sent via email or sms.

Once you generate the OTP code, you must verify the OTP code via verify OTP email or verify OTP sms

See Also

Endpoint Authentication

Use authorization bearer header with the following format:

Authorization: Bearer \<ProjectId:ManagementKey\>

Try it

/v1/mgmt/tests/generate/otp

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

< Project ID >:< Management Key > as bearer

In: header

Request Body

loginIdstring

deliveryMethodstring

loginOptionsobject

Status codeDescription
200OK
curl -X POST "https://api.descope.com/v1/mgmt/tests/generate/otp" \
  -d '{
  "loginId": "string",
  "deliveryMethod": "string",
  "loginOptions": {
    "stepup": false,
    "customClaims": {},
    "mfa": false,
    "ssoAppId": "string",
    "templateOptions": {
      "property1": "string",
      "property2": "string"
    },
    "locale": "string",
    "pkceChallenge": "string"
  }
}'

{
  "loginId": "string",
  "code": "string"
}

Was this helpful?