Send a one-time passcode
Sends a mobile OTP via SMS. Will register the account if it doesn't already exist
- Requires a
service_role
key. - This function should only be called on a server. Never expose your
service_role
key in the browser.
Parameters
phone
REQUIRED
stringThe user's phone number WITH international prefix
options
Optional
objectcaptchaToken
Optional
stringshouldCreateUser
Optional
boolean
const { data: user, error } = await supabase.auth
.api
.sendMobileOTP('12345879')