OTP Template Management
Manage OTP messages for your connected channels in one dashboard. Create templates, track approval and choose which message to use for each verification request.
Prepare Your OTP Messages for Delivery
Create a verification message for each channel you plan to use. Add your app name and code placeholder where supported, and follow the channel’s content requirements.
Submit templates for review and check their approval status in SecondFactor before sending live traffic.
Set a default template for routine sends, or choose a template in each API request.
- SMS Approved
- WhatsApp Approved
- Viber In review
- RCS In review
Illustrative statuses. Review requirements and timing depend on the channel.
Manage Templates Across Your Channels
Keep channel-specific messages and approval statuses in one dashboard, with the same API for sending codes.
Channel-Specific Messages
Prepare messages for SMS, WhatsApp, Viber and RCS according to each channel’s format.
Approval Tracking
Check which templates are approved and which are still under review.
Default Template
Set a default so your application can send codes without specifying a template each time.
Template Selection
Choose a template for signup, login or another verification flow by passing its ID in the send request.
How Template Setup Works
Create a template, complete the required review and select it when you send.
Create the Template
Write the message for a connected channel with your app name and the OTP placeholder, following that channel’s format.
Submit It for Review
Templates are reviewed before live traffic. Requirements and timing depend on the channel and destination.
Track Its Status
Check approval in your dashboard before using the template for live requests.
Send With It
Send with your default template, or pass a template ID to choose one for that request.
Choose a Template in the Send Request
TemplateSid is optional. Leave it out and SecondFactor uses your default template. Include it to use one of the templates listed on your dashboard’s Templates page.
Set up a default before omitting TemplateSid. If neither is available, the request is rejected. Any template ID you provide must belong to your account.
# Default template
curl -X POST "https://api.secondfactor.ai/v2/Services/$SERVICE_SID/Verifications" \
-H "X-API-Key: $SF_API_KEY" \
--data-urlencode "To=+9779841000000"
# A specific template
curl -X POST "https://api.secondfactor.ai/v2/Services/$SERVICE_SID/Verifications" \
-H "X-API-Key: $SF_API_KEY" \
--data-urlencode "To=+9779841000000" \
--data-urlencode "TemplateSid=$TEMPLATE_SID"
Template Rules by Channel
Message formats and approval requirements vary by channel. Check sender setup as well as template approval before sending.
SMS
Use your app name and a code placeholder. Message length and encoding affect the number of billable SMS segments. SMS OTP
Authentication templates use prescribed wording, with an optional security disclaimer and expiry warning. WhatsApp OTP
Viber
Write your own verification message within Viber’s content rules, then submit it for review. Viber OTP
RCS
Submit an authentication template once your RCS sender review is complete. RCS OTP
More SecondFactor Features
Automatic OTP Routing and Fallback
Route codes through eligible channels, with fallback after eight seconds without delivery confirmation. Learn more →
OTP Delivery Logs and Costs
See the channel, delivery status and cost of every OTP request. Learn more →
PIE Playground
Send a real OTP, inspect its route and verify the code before you integrate. Learn more →
Frequently Asked Questions
Write to support@secondfactor.ai for anything not covered here.
Do I Need a Template Before Sending an OTP?+
Yes. A send needs either a TemplateSid or a default template on your account. Without one, the request is refused and not charged.
Can I Write My Own OTP Message?+
It depends on the channel. SMS and Viber templates take your own wording with your app name and an OTP placeholder, subject to review. WhatsApp authentication templates use prescribed wording with configurable options.
How Long Does Template Approval Take?+
Approval timing depends on the channel and its review process. Check the template’s status in your dashboard before using it for live delivery.
Do All Channels Use the Same Message Format?+
No. Each channel has its own content and approval requirements. Manage the templates in one dashboard, and prepare the message format required by each channel.
Can I Use Different Templates for Signup and Login?+
Yes. Pass a different TemplateSid with each send to choose the template for that verification.
What Happens if I Send Without a Template?+
SecondFactor uses your account’s default template when you omit TemplateSid. If you have no default, the request is rejected before delivery.
Set Up Your OTP Templates
Create an account to add your first template, or talk to our team about sender and template requirements for your destination markets.