--- id: auth-api-sendmobileotp title: "sendMobileOTP()" slug: auth-api-sendmobileotp custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml --- import Tabs from '@theme/Tabs'; import TabsPanel from '@theme/TabsPanel'; Sends a mobile OTP via SMS. Will register the account if it doesn't already exist ## Parameters ## Notes - Requires a `service_role` key. - This function should only be called on a server. Never expose your `service_role` key in the browser. ## Examples ### Basic example. ```js const { data: user, error } = await supabase.auth .api .sendMobileOTP('12345879') ```