SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Is it Possible to Customize the Verification Message for Verify?

Yes, the Verify Templates feature, currently in beta testing, allows you to customize the message to send for SMS or Voice verifications to your users. There are two Template options that give you control beyond the Verify Default template:

  • Pre-Approved Templates: a list of curated templates ready for use.
  • Custom Templates: these are created by you, and need to get approved and registered. They’re available on a case by case basis

To get started, you can take a look at our pre-approved templates to confirm if one of them works for your use case. You can also list available templates with this request:

curl -X GET "https://verify.twilio.com/v2/Templates?PageSize=20" \
    -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Once you have the Template SID you want to use, you can update your Service to use the template as default:

curl-X POST https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
    --data-urlencode "DefaultTemplateSid=HJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\
    -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Alternatively, you can pass the Template SID every time you create a new verification:

curl-X POST https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications \
    --data-urlencode "To=+15017122661"\--data-urlencode "Channel=sms"\
    --data-urlencode "TemplateSid=HJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\
    -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

For more information on how to implement this feature, please refer to our documentation.

How to request a custom template

If one of our pre-approved templates does not work for your use case, you can request a custom template. Make sure to check the following when creating your body message:

  • You must include the code variable
{{code}} The 4-10 digit one-time passcode.
  • Optionally, you might include the following variables:
{{friendly_name}} The friendly name of your Verification Service.
{{ttl}} The expiration time of the one-time passcode in minutes.
  • Check the message body you want in the segment calculator. Ideally, your template should have just 1 segment (be aware that you're charged per segment), but it's fine to have a longer SMS as long as you agree with the charges. To learn more, check: What The Heck Is A Segment? 

To request the private template registration, contact our Twilio Support Team with the following information:

  • Your account SID
  • Your Verify service SID
  • The message body you want to register
    • Follow the instructions above to build it
    • If you're registering multiple templates or translations, use the CSV format below
  • The name you want to assign to the custom template
  • The locale - include if the locale is going to be used as default
  • Confirm if the template will be used to send traffic to Canada, Singapore, Malaysia or China

You can submit your custom template and its translations to our team in a CSV format like:

templateName

 

channels

locale

isDefaultLocale

messageBody

Example template

sms

en

TRUE

Your {{friendly_name}} verification code is: {{code}}

Example template

sms

fr

FALSE

Votre code de vérification {{friendly_name}} est: {{code}}

Example template

sms

de

FALSE

Dein {{friendly_name}} Sicherheitscode lautet: {{code}}

Notice: The registration of custom templates can take about 2-4 weeks

If your request is successful, you'll find your custom templates by navigating on Console to Verify > Settings > Templates Management. You can Approve or Reject the translations

Once the template and its translations are approved by you, you'll be able to use it as described above.

FAQs

Can I submit languages that Verify doesn’t support? 

Although our language support for the Verify Default template is limited, we have a longer list of supported locales for custom templates. Please check Verify Supported Languages page

Be aware that if you try to use a locale we don't support, you'd get error 60331.

Will I get a unique template for each language I register?

No, you can register a list of translations per a single template ID. Then, you can pass in the appropriate language within the locale param.

You must provide the translated body messages

If for some reason I pass a locale that is not defined in the template, can we expect that the message will default to English?

If you pass a locale that is not defined in the template, we'll fall back to the default locale you defined at template creation. For Verify Default templates and pre-approved templates, the default will be English.

Have more questions? Submit a request
Powered by Zendesk