OTP as a Service

Secure your application with one-time password verification. Protect user accounts, prevent unauthorized access, and comply with data protection requirements. Two simple API calls.

Register & Get Your API Key Integration Example API Docs

Why Use Our OTP API?

๐Ÿ“ฑ

SMS Verification

Verify South African mobile numbers instantly

โšก

Two API Calls

Send OTP, then verify. That's it.

๐Ÿ”’

Secure

5-min expiry, brute force protection, single-use codes

๐Ÿ’ฐ

Pay As You Go

No monthly fees. Only pay per OTP sent.

Pricing

SMS OTP

E0.85
per verification
  • 100 OTPs โ€” E85
  • 500 OTPs โ€” E400
  • 2,000 OTPs โ€” E1,400

How It Works

Step 1: Sign up below and get your API key
Your API key looks like: ek_541bdb638a26c0a335444af2... Include it in every request as the X-Api-Key header.
Step 2: Send an OTP to your user's phone or email
POST /otp/send Headers: Content-Type: application/json X-Api-Key: YOUR_API_KEY Body: { "channel": "sms", โ† or "email" "recipient": "0761234567", โ† phone number (local SA format) "app_name": "MyApp" โ† your app name (shown in the message) } Response: { "success": true, "otp_id": "a1b2c3d4e5f67890", โ† save this, you need it for step 3 "expires_in": 300 โ† OTP expires in 5 minutes }
Step 3: Your user enters the code โ†’ you verify it
POST /otp/verify Headers: Content-Type: application/json X-Api-Key: YOUR_API_KEY Body: { "otp_id": "a1b2c3d4e5f67890", โ† from step 2 "code": "482916" โ† the code your user entered } Response (correct code): { "success": true, "verified": true } Response (wrong code): { "success": true, "verified": false, "attempts_remaining": 4 }
Check your credit balance anytime
GET /otp/balance Headers: X-Api-Key: YOUR_API_KEY Response: { "sms_credits": 95, "email_credits": 200 }
Base URL for all endpoints
https://api.ekukhulenilabs.co.za
Error codes
400 โ€” Missing or invalid fields 401 โ€” Invalid or missing API key 402 โ€” Insufficient credits 404 โ€” OTP not found or expired 410 โ€” OTP already used or expired 429 โ€” Too many attempts (max 5 per OTP)

Add OTP Login to Your App

Copy and paste this into your project. That's the entire integration.

Your Backend โ€” send OTP when user clicks "Login"
// When user enters their phone number and clicks "Send Code" const res = await fetch('https://api.ekukhulenilabs.co.za/otp/send', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ channel: 'sms', recipient: userPhoneNumber, app_name: 'YourApp' }) }); const { otp_id } = await res.json(); // Save otp_id โ€” you need it to verify
Your Backend โ€” verify the code the user enters
// When user submits the 6-digit code const res = await fetch('https://api.ekukhulenilabs.co.za/otp/verify', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ otp_id: otp_id, code: codeUserEntered }) }); const { verified } = await res.json(); if (verified) { // โœ… Log them in โ€” the phone number is confirmed }
Your Frontend โ€” just a text box
<!-- Step 1: User enters phone number --> <input type="tel" id="phone" placeholder="Phone number"> <button onclick="sendOTP()">Send Code</button> <!-- Step 2: User enters the code they received --> <input type="text" id="code" placeholder="Enter 6-digit code" maxlength="6"> <button onclick="verifyOTP()">Verify</button>

Works with any language โ€” JavaScript, Python, PHP, Java, C#. It's just HTTP calls.
We handle code generation, SMS delivery, expiry, brute-force protection, and failover.

๐Ÿงช Try It Live

Register & Get Your API Key

Questions?

๐Ÿ“ž WhatsApp: +268 7953 1182

โœ‰๏ธ Email: sales@ekukhulenilabs.com