Skip to main content

configure-sms-connector

Configure steps​

Navigate to β€œConnector > Email and SMS connectors” in Logto Console.

Add a new SMS connector​

To add a new SMS connector, click the β€œSet up” button, and select the desired SMS connector.

Select SMS connector

In the configuration process, follow the steps below:

  1. Go through the README doc for each type connector on the left, then follow the instructions.
  2. Fill out any required forms in the Parameter Configuration section on the right.
  3. Customize the SMS template to fit your needs by editing the JSON code.
  4. Test the configuration by sending an SMS verification code to your phone number using the β€œGeneric” template.
  5. Click "Save and Done" to finish.

Configure SMS connector guideline

Change to another SMS connector​

If you wish to change the current SMS connector, simply access the connector details page and click the β€œChange connector” button of the β€œMore” menu in the top-right corner. Or you can delete the old connector first, then add a new SMS connector.

note

You can bring ONLY ONE SMS connector alive.

If you change the living SMS connector and save changes, the previous SMS connector will be disabled automatically. Also, the config of past connectors will lose track. You may keep the old connectors' config properly if you want to switch back to those connectors in the future.

SMS template​

Notice that:

  • Logto provides four different templates for customizing SMS content, which are categorized based on their usage type: Register, SignIn, ForgotPassword, and Generic. It is highly recommended that you use different templates for various use cases, or it could trigger flow control, leading to a temporary outage of your service.
  • The verification code is valid for 10 minutes by default.
  • The verification code number sent to users uses the variate of {{code}}.

There are some examples just for reference: Follow the README to compose the connector config JSON with little effort.

UsageScenarioTemplate Example
RegisterUsers create an account using their phone number and verify by entering the verification code.Your Logto sign-in verification code is {{code}}. The code will remain active for 10 minutes.
SignInUsers sign in using their phone number and verify by entering verification code instead of entering a password.Your Logto sign-up verification code is {{code}}. The code will remain active for 10 minutes.
ForgotPasswordIf users forget their password during sign-in, they can choose to verify their identity using their phone number.Your Logto password change verification code is {{code}}. The code will remain active for 10 minutes.
GenericThis template can be used as a generic backup option for various scenarios, including linking a phone number to an existing account or testing connector configuration…Your Logto verification code is {{code}}. The code will remain active for 10 minutes.