Paste the prompt to your favorite AI tool. Your agent reads the API reference, writes the
integration, and
tests it.
Full API reference included in the prompt
Test it with Sandbox key auto-included
Claude, Cursor, n8n, Make and other AI tools.
MCP server: send and verify with no backend to run
Official SDKs: Node.js, Python, Go, PHP
Connect with just one Prompt
otp-integration
Integrate otp.com OTP verification into this project.
API docs: https://otp.com/docs
Base URL: https://api.otp.com/api/v1
Auth: Bearer token in the Authorization header
## Step 1: Send a code
POST /otp/send
Body: { "recipient": "+14155552671", "locale": "en", "client_ip": "<end user's IP>" }
→ Returns { "otp_id": "9f3c1b2a-…", "status": "pending", "channel": "sms" }
## Step 2: Verify the code the user entered
POST /otp/verify
Body: { "otp_id": "9f3c1b2a-…", "code": "123456" }
→ Returns { "otp_id": "9f3c1b2a-…", "status": "approved", "matched": true }
Notes:
- recipient is a phone number (E.164) or an email; do not send a "channel", your account routing picks it.
- client_ip is the END USER's IP from the request context (e.g. req.ip), never the server's own; requests without it share a much tighter rate limit.
- The code is never returned by the API.
Sandbox test keys (otp_test_…) accept the fixed code 123456; $3 free credits.
Integrate otp.com using the official Node.js SDK.
Install:
npm install @otp.com/sdk-node
Initialize:
import { Configuration, OTPApi } from "@otp.com/sdk-node"
const api = new OTPApi(new Configuration({ accessToken: process.env.OTP_API_KEY }))
## Step 1: Send a code
// clientIp = the END USER's IP from the request context (e.g. req.ip), not the server's.
const sent = await api.sendOtp({ sendOtpRequest: { recipient: "+14155552671", locale: "en", clientIp: "81.2.69.142" } })
## Step 2: Verify the code
const result = await api.verifyOtp({ verifyOtpRequest: { otpId: sent.otpId, code: "123456" } })
// result.matched === true
Official SDKs: Node.js, Python, Go, PHP.
Sandbox test keys (otp_test_…) accept the fixed code 123456; $3 free credits.
Connect otp.com to your AI agent via MCP.
Add to your MCP config (claude_desktop_config.json):
{
"mcpServers": {
"otp": {
"command": "npx",
"args": ["-y", "@otp.com/mcp"],
"env": { "OTP_API_KEY": "otp_test_•••" }
}
}
}
Exposed tools:
- send_otp → send a code (channel chosen by your account routing)
- verify_otp → check the code the user entered (otp_id, code)
- resend_otp → resend on the next channel (otp_id)
- get_otp_status → look up an OTP by otp_id
Your agent sends and verifies users in a single prompt.
Sandbox test keys (otp_test_…) accept the fixed code 123456; $3 free credits.
Universal
SMS
Works on every phone, no app required. Global
coverage via tier-1 aggregators.
Most Popular
WhatsApp
2B+ users, high open rates.
The user taps a link to receive a code over chat, then enters it like any channel.
Alternative
Telegram
2B+ users, high open rates.
Official Business API routing. Automatic SMS fallback.
Best for web
Email OTP
One-time code to the inbox. Great for SaaS
sign-ups, logins, and low-friction flows.
Channels
Every way users authenticate. One API.
You send only the recipient; your routing picks the channel.Automatic fallback chains keep delivery above 99%.
Built for developers who have dealt with billing surprise and weeks-long enterprise
onboarding.
Automatic fallback.
Zero missed verifications
You send only the recipient and we handle the rest. If a channel does not get through, the next one in your order fires. Every fallback is invisible to the user, they just get verified. No extra code, no configuration.
SMS
→ WhatsApp
→ Telegram
Sending via SMS...
You
One API.
Every channel.
A single endpoint covers SMS, WhatsApp, Telegram, and Email OTP. The channel is chosen by your routing, not passed per call. Routing, retries, and delivery receipts are all handled server-side.
POST /otp/send
{ "recipient": "+14155552671" }
→ delivered via
sms
You
Global coverage,
transparent pricing.
Deliver to 180+ countries with per-country routing. Pricing is public and per verification sent, at the published rate for each destination. No surprise invoices, no monthly minimums.
🇺🇸 United States$0.0132
🇩🇪 Germany$0.0480
🇹🇷 Türkiye$0.0012
SMS, per verification
You
Prepaid credits.
No surprise invoice.
You top up a credit balance and each verification draws from it at the published rate. No setup fee, no monthly minimum, no subscription. Test keys run in the sandbox, where nothing is delivered and nothing is charged.
Credit balance
$50.00
Verification sent. No invoice, no minimum.
You
Per verification$0.0132
Estimated monthly$132.00Billed per verification sent.
SMS and WhatsApp cost nearly the same in this country.
Estimates only. SMS shows the lowest rate available for the selected country; actual
pricing varies by country, operator, and the fallback chain your routing uses.
PRICING
Transparent. Per verification.
Billed per verification sent.
Public per-country rates, no monthly minimums.
We use cookies to keep otp.com running and secure. With your consent, we'd also like
to use analytics cookies to understand how the site is used. See our Privacy Policy
for details.
Strictly necessary
Required for the site and dashboard to function. Always on.