--- id: auth-api-sendmobileotp title: 'sendMobileOTP()' slug: auth-api-sendmobileotp custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v1_legacy.yml --- import Tabs from '@theme/Tabs' import TabItem from '@theme/TabItem' 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') ```