Skip to main content

If you are using our backend SDK that is lesser than the following versions, please visit the older documentation link here.

SMS Delivery services

The following SMSs are sent by this recipe:

  • Passwordless login SMS

In this section, we will explore how to customise the content and delivery method of this SMS.

Method 1) Default behaviour#

If you provide no configuration for sms delivery, the backend SDK send SMSs by talking to our servers on https://api.supertokens.com (for both self hosted and managed versions). This requires no setup from your side.

important

This is a free service and is globally rate limited. So this is not suitable for production use. If you do not recieve an SMS using this method, then the SDK will print the SMS content on the terminal.

Learn more about the default email templates and this method in the default service section.

Method 2) Use your own Twilio account#

Using this method, you can provide your own Twilio account details to the backend SDK, and the SMSs will be sent using those. Use this method if you:

  • Have a Twilio account already.
  • You want to customise the default SMS content.

Learn more about this method in the Twilio section.

Method 3) Using the SuperTokens SMS service#

Using this method, SuperTokens will send SMSs to your users automatically. Use this method if:

  • You are already using our managed service - this is the quickest way to setup SMS sending.
  • You want to take advantage of some of the SMS sending optimisations we will do over time:
    • Reduce SMS cost by picking a local SMS service based on the destination country.
    • Fight spam / misuse of SMS.
important

This is a paid service and we charge for every SMS based on the cost we incur. We give new users $10 worth of credits.

Learn more about this method in the SuperTokens SMS service section.

Method 4) Take full control of SMS sending#

This method allows you provide a callback using which you can send SMSs however you like. The input to the callback will be SMS template variables, so you can freely create the content of the SMS as well. Use this method if you are:

  • Using a third party SMS service that is not Twilio.
  • You want to use another delivery methog like Whatsapp or FB Messenger.
  • You want to do some custom spam protection before sending the SMS.
  • You already have an SMS sending infrastructure and want to use that.

Learn more about this method in the Custom method section.

Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI