Verification Message Template
On this page
FusionAuth sends this message to verify a phone number: after a user registers or changes a phone number, when you call the Identity Verify API, and for identity pre-verification. Assign the template in Verification template on the Tenants -> Your Tenant -> Identities tab. To override the template for one Application, set Verification template on the Applications -> Your Application -> Identities tab.
Default Template#
FusionAuth ships the following default template:
[#-- When a one-time code is provided, you will want the user to enter this value interactively using a form. In this workflow the verificationId
is not shown to the user and instead the one-time code must be paired with the verificationId which is usually in a hidden form field. When the two
values are presented together, the phone number can be verified --]
[#if verificationOneTimeCode??]
Verification code: ${verificationOneTimeCode}
[#else]
To complete your phone number verification click on the following link.
${baseUrl}/phone/verify/${verificationId}?client_id=${(application.oauthConfiguration.clientId)!''}&tenantId=${tenant.id}
[/#if]
- FusionAuth Admin
Replacement Variables#
applicationThe Application object. For field definitions, see the Application API.
The variable is present only when the request that sends the message identifies an Application. Check for the variable before you use it:
[#if application??]
${application.name}
[/#if]
baseUrlThe base URL for links in the message. FusionAuth uses the Application baseURL, then the Tenant baseURL, then http://localhost:9011.
phoneNumberThe phone number to verify. The Generic messenger request has the same value in phoneNumber.
stateThe state from the verification request. The variable is present only when the request includes state.
tenantThe Tenant object. For field definitions, see the Tenant API.
verificationIdThe verification Id for the Identity Verify API.
verificationOneTimeCodeThe one-time code for the FormField verification strategy. The user enters the code to verify the phone number.
The template receives no user, because FusionAuth can send the message before the user exists, during identity pre-verification. Use phoneNumber to refer to the recipient.
Related
Learn when FusionAuth sends the passwordless login email, and which variables the template receives.
Learn when FusionAuth sends the passwordless login message, and which variables the template receives.
Learn when FusionAuth sends the message that confirms a verified phone number, and which variables the template receives.
API documentation for the FusionAuth Create an Email Template API.