POST
/v1/mgmt/tests/generate/magiclink

Authorization

AuthorizationRequiredBearer <token>

< Project ID >:< Management Key > as bearer

In: header

Request Body

application/jsonRequired
loginIdstring
deliveryMethodstring
redirectUrlstring
loginOptionsobject
curl -X POST "https://api.descope.com/v1/mgmt/tests/generate/magiclink" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "loginId": "string",
    "deliveryMethod": "string",
    "redirectUrl": "string",
    "loginOptions": {
      "stepup": false,
      "customClaims": {},
      "mfa": false,
      "ssoAppId": "string",
      "templateOptions": {
        "property1": "string",
        "property2": "string"
      },
      "locale": "string",
      "pkceChallenge": "string",
      "revokeOtherSessions": true
    }
  }'

OK

{
  "loginId": "string",
  "link": "string"
}

Was this helpful?

Generate OTP POST

### 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](/api/otp/email/verify-otp) or [verify OTP sms](/api/otp/sms/verify-otp) ### See Also - See [OTP Authentication](/api/otp/) for details about implementing OTP. - See [Create a user](/api/management/users/create-user) with the `test` flag set to true to set it as a test user. - See [Manage Test Users](/manage/testusers/) for more information on test users. ### Endpoint Authentication Use authorization bearer header with the following format: `Authorization: Bearer <ProjectId:ManagementKey>`

Generate Enchanted Link POST

### Generate a Enchanted Link for a test user. This endpoint is used to generate a Enchanted Link for a test user. You can define whether this is sent via email or sms. Once you generate the Enchanted Link Token must be verified via [verify token](/api/enchanted-link/verify-token) ### See Also - See [Enchanted link Authentication](/api/enchantedlink/) for details about implementing enchanted links. - See [Create a user](/api/management/users/create-user) with the `test` flag set to true to set it as a test user. - See [Manage Test Users](/manage/testusers/) for more information on test users. ### Endpoint Authentication Use authorization bearer header with the following format: `Authorization: Bearer <ProjectId:ManagementKey>`