Skip to content

Sign up with SMS OTP

POST
/signup/passwordless/sms

Register a new user account using SMS OTP authentication. Sends a one-time password to the specified phone number. Use this endpoint to explicitly register a new account. When AUTH_DISABLE_AUTO_SIGNUP is enabled, this is the only way to register through this method.

Phone number and optional user options for SMS OTP registration

object
phoneNumber
required

Phone number of the user

string
Example
+123456789
options
object
allowedRoles
Array<string>
Example
[
"me",
"user"
]
defaultRole
string
Example
user
displayName
string
<= 32 characters /^[\p{L}\p{N}\p{S} ,.'-]+$/
Example
John Smith
locale

A two or three characters locale

string
>= 2 characters <= 3 characters
Example
en
metadata
object
key
additional properties
any
Example
{
"firstName": "John",
"lastName": "Smith"
}
redirectTo
string format: uri
Example
https://my-app.com/catch-redirection

OTP sent to the user’s phone number. To prevent account enumeration, this response is also returned without side effects when the phone number is already registered.

string
Allowed values: OK

An error occurred while processing the request

Standardized error response

object
status
required

HTTP status error code

integer
Example
400
message
required

Human-friendly error message

string
Example
Invalid email format
error
required

Error code identifying the specific application error

string
Allowed values: default-role-must-be-in-allowed-roles disabled-endpoint disabled-user user-already-exists email-already-verified forbidden-anonymous internal-server-error invalid-email-password invalid-request locale-not-allowed password-too-short password-in-hibp-database redirectTo-not-allowed role-not-allowed signup-disabled unverified-user user-not-anonymous invalid-pat invalid-refresh-token invalid-ticket disabled-mfa-totp no-totp-secret invalid-totp mfa-type-not-found totp-already-active invalid-state oauth-token-echange-failed oauth-profile-fetch-failed oauth-provider-error invalid-otp cannot-send-sms provider-account-already-linked