SupabaseS
Supabase5w ago
Wes

cannot send otp via SMS with Twilio

This code works if I'm running Supabase locally thru the CLI, but doesn't work in production. I copied the Twilio account SID, auth token, and message service SID from production into my local config to make sure that there are no typos.

const { data, error } = await signInWithOTP({
  phone: options.phone,
  options: { channel: "sms", shouldCreateUser: true },
});


Both calls return the same response:
{
    "data": {
        "user": null,
        "session": null
    },
    "error": null
}


When running locally the text comes thru instantly. In production I see no errors and the auth logs appear fine, but the text msg never arrives.
Was this page helpful?