Skip to main content
POST
/
signin
/
passwordless
/
sms
Sign in with SMS OTP
curl --request POST \
  --url https://{subdomain}.auth.{region}.nhost.run/v1/signin/passwordless/sms \
  --header 'Content-Type: application/json' \
  --data '{
  "phoneNumber": "+123456789",
  "options": {
    "allowedRoles": [
      "me",
      "user"
    ],
    "defaultRole": "user",
    "displayName": "John Smith",
    "locale": "en",
    "metadata": {
      "firstName": "John",
      "lastName": "Smith"
    },
    "redirectTo": "https://my-app.com/catch-redirection"
  }
}'
"OK"

Body

application/json

Phone number and optional user options for SMS OTP authentication

phoneNumber
string
required

Phone number of the user

Example:

"+123456789"

options
object

Response

OTP sent to user's phone number successfully

The response is of type enum<string>.

Available options:
OK
I