Multipurpose SMS OTP

Generates an OTP for the User, applicable for adding a Phone, Phone ID verification, and other SMS-related actions.

POST
/identity/v2/manage/account/smsotp/{smsotptype}

Generates an OTP for the User, applicable for adding a Phone, Phone ID verification, and other SMS-related actions.

Authorization

apikey<token>

Tenant API Key for authentication

In: query

apisecret<token>

Tenant API Secret for authentication

In: query

Path Parameters

smsotptype*string

OTP purpose: addphone, phoneidverification, forgotpassword, forgotpin, onetouchlogin, smartlogin, passwordlesslogin, or deleteuser.

Value in"addphone" | "phoneidverification" | "forgotpassword" | "forgotpin" | "onetouchlogin" | "smartlogin" | "passwordlesslogin" | "deleteuser"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

phone*string

The Phone number of the User.

uid*string

The UID of the User.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.loginradius.com/identity/v2/manage/account/smsotp/addphone" \  -H "Content-Type: application/json" \  -d '{    "phone": "+1234567890",    "uid": "abc123"  }'
{
  "Token": "e3c12e4f2c134f2ba2c6f623e1d3be7f",
  "ExpiresIn": "2025-12-31T23:59:59Z",
  "IdentityProviders": [
    "google",
    "facebook"
  ]
}

{
  "ErrorCode": 1214,
  "Message": "Dangerous request",
  "Description": "A potentially dangerous request value was detected."
}

{
  "ErrorCode": 902,
  "Message": "The API secret is unauthorized",
  "Description": "The provided LoginRadius API secret is invalid or is not authorized, please use a valid or authorized LoginRadius API secret or check the API secret for your LoginRadius account."
}

{
  "ErrorCode": 1074,
  "Message": "Phone number login is not enabled",
  "Description": "The phone number login is not enabled, please enable the phone number login in order to process this request."
}