Messaging Templates
This guide explains how to customize and manage messaging templates for various authentication methods and user invitations in Descope.
To learn how to use messaging templates for authentication within flows, refer to our Flow Actions Doc, and for user invites, refer to our User Invite Doc.
Creating Templates
Authentication Templates
To create an authentication template:
- Go to the settings of each respective Authentication Method in the Console
- Select your configured messaging connector (Email, SMS, Voice, or Instant Messaging)
- Click
+ New Template
User Invitation Templates
To create a user invitation template:
- Go to Sign Ups and User Invitations under Project Settings
- Select your configured messaging connector (Email or SMS)
- Click
+ New Template
Template Editor
The template editor supports both HTML (for Email) and plain text (for Email, SMS, Voice, or Instant Messaging) formats. They support dynamic content using the syntax {{}}
. You can also preview the message by clicking the preview tab.
HTML Format
Plain Text Format
Template Localization
If you would like to translate your email or SMS depending on your user's location, you can set up template localization using the Descope console. Refer to the Localization Configuration Overview for more details.
Dynamic Content with Template Options
Template options allow you to pass dynamic data to your templates. You can set these options through both flows and SDKs.
You can access template options in your templates by prefixing the key with options_
. For example:
With Flows
- Select the message-sending action
- Click
+
to add template options - Add key-value pairs for dynamic content
With SDKs
You can utilize the templateOptions
parameter within the SDK authentication functions to set the template options values. The example below is for the the Sign Up Or In via magic link function using the Node SDK. Check out the specific SDK docs for each authentication method for more details on how to use template options.