SMS templates
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 hit rate limit, leading to a temporary outage of your service.
SMS template types and examplesβ
There are some examples just for reference:
Usage | Scenario | Template Example |
---|---|---|
Register | Users create an account using their email and verify it by entering a verification code sent by Logto to their email. | Your Logto sign-up verification code is {{code}} . The code will remain active for 10 minutes. |
SignIn | Users sign in using their email and verify by entering verification code instead of entering a password. | Your Logto sign-in verification code is {{code}} . The code will remain active for 10 minutes. |
ForgotPassword | If users forget their password during login, they can choose to verify their identity using the email they've already verified with Logto. | Your Logto password change verification code is {{code}} . The code will remain active for 10 minutes. |
Generic | This template can be used as a general backup option for various scenarios, including testing connector configurations and so on. | Your Logto verification code is {{code}} . The code will remain active for 10 minutes. |
It's important to understand these parameters:
- The verification code is valid for 10 minutes. We currently do not support customization on the expiry time.
- Logto will replace the
{{code}}
placeholder in the SMS template with a verification code. Therefore, please ensure that the template has a placeholder reserved.
note
Some countries and regions may not allow sending unapproved content via SMS due to compliance requirements. SMS templates need to be registered and approved by the SMS provider before they can be used. In such cases, the content might be indexed by template ID to the corresponding template.