Home SMS OTP Pricing Log in Get started
OTP Verification API

Verify users in seconds, not minutes

Two API calls. We handle delivery, token expiry, and brute-force protection out of the box. Pay-as-you-go. No setup fees, no monthly retainers, no hidden contracts.

SMS delivery

Codes delivered via SMS to any mobile number in Southern Africa.

5-minute expiry

Codes auto-expire. No stale tokens, no security gaps.

Brute-force protection

Max 5 attempts per code. Automatic lockout on abuse.

Pay per verification

1 credit per OTP. No monthly fees, no minimums.

Two calls. That's it.

No SDKs to install, no webhooks to configure. Send a code, verify the code. Your user is authenticated.

1

Send OTP

POST to /otp/send with the recipient's phone number. We generate a 6-digit code and deliver it via SMS.

2

Verify code

Your user enters the code. POST to /otp/verify with the code. We tell you if it's correct.

3

Done

User is verified. Log them in, approve the transaction, or confirm the signup.

verify.js
// Step 1: Send OTP const { otp_id } = await fetch( "https://api.lunyazi.com/otp/send", { method: "POST", headers: { "X-Api-Key": API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ channel: "sms", recipient: "+26876001234", app_name: "MyApp" }) }).then(r => r.json()) // Step 2: Verify the code const { verified } = await fetch( "https://api.lunyazi.com/otp/verify", { method: "POST", headers: { "X-Api-Key": API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ otp_id, code: userInput }) }).then(r => r.json()) if (verified) { // ✅ User is authenticated }

Test the OTP flow live

Enter your API key and phone number to send a real OTP right now. Don't have a key? Sign up free → and get 5 credits to test with.

Secure your app in minutes

Create an account, get your API key, and add OTP verification to your app today.

Create free account →