Two-factor authentication (OTP)
One-time passwords that reach the customer
Send sign-in and payment codes by SMS, let the platform generate them for you, and call the customer with the code when a text does not arrive.
VoiceSMS
The problem and the technical fix
The problem
SMS-only codes that arrive late or not at all lock customers out, and a spoofed sender can be used for phishing.
The technical fix
Codes generated by the platform, a delivery status for every message ID, a voice call as the backup and a verified RCS sender that is harder to impersonate.
How it works
An example of the steps, connected to your systems through the API and webhooks. Illustrative.
- Sign-in Your application asks for a code for the customer
- SMS The API sends the message with a 4 or 6 digit code
- Delivery status The message ID shows whether the code was delivered
- Backup call If needed, a voice call reads the code out
- Verify Your application checks the code the customer enters
What you use
The products behind this solution and the job each one does. One account and one set of APIs for all of them.
- SIP trunkingVoice API calls that read the code out when a text does not arrive.
- A2P SMS gatewayCodes sent through the SMS API, with the #OTP4# or #OTP6# placeholder.
- RCS Business MessagingCodes from a verified, branded sender that is harder to impersonate.
- ReportingThe delivery status of every code, so support can check what happened.
For developers
What it looks like in code
Send the code with one call to POST /sms/send. Put #OTP6# or #OTP4# in the message and the platform inserts the code. The response gives a message ID for the delivery status.
curl -X POST 'https://portal.par-infinity.com/api/v1/sms/send/' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"from": "MyBrand",
"to": "14155550123",
"message": "Your code is #OTP6#",
"bind_name": "YOUR_BIND_NAME"
}'
import requests
url = "https://portal.par-infinity.com/api/v1/sms/send/"
headers = {"Authorization": "YOUR_API_KEY"}
payload = {
"from": "MyBrand",
"to": "14155550123",
"message": "Your code is #OTP6#",
"bind_name": "YOUR_BIND_NAME"
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
print(response.status_code, response.json())
{
"status": "ok",
"message": "Message Sent",
"origination_message_id": "acba1293an"
}
Request and response as documented in the API reference. Replace the key, sender ID and bind name with your own. API reference
What you need to get started
The set-up steps we go through with you.
Create an API key
Generate a key in the portal and keep it on your server, never in an app or a web page.
Register your sender ID
Register the sender ID and, where required, the message template for each country you send to.
Add the code to your sign-in
Call the SMS API with the #OTP4# or #OTP6# placeholder, then check the code the customer enters.
Plan the backup
Decide when to offer a voice call with the code, for example after the customer asks for a new one.
Things to plan for
Rules and good practice we help you with during set-up. This is general guidance, not legal advice.
- Keep OTP traffic separate from marketing messages, as many countries and carriers require.
- Limit how often a code can be requested and how long it stays valid, to reduce fraud and cost.
- Keep code messages short and never include other account details.
Common questions
Can't find what you need? Ask our team.
Do we have to generate the codes ourselves?
No. Put #OTP4# or #OTP6# in the message text and the platform inserts a 4 or 6 digit code.
What if the SMS does not arrive?
Check its delivery status with the message ID, and offer a voice call that reads the code out as a backup.
Do we need a registered sender ID?
In many countries, yes. The rules differ by destination, and our team will tell you what applies to the countries you send to.
Tell us what you need to call, automate or send
Share your channels, countries and volumes. We will confirm what is available and how to integrate it.