Integration guide & live sandbox

Connect JustAuth to verify your users over WhatsApp. Test the full send-and-verify flow below, then copy the reference into your stack.

API sandbox

Send a test verification code and confirm it — no account required. Responses appear in the console in real time.

Test mode

Send & verify

Indian format — country code + 10 digits
Response console
// Send a request to see the live API trace…

How verification works

JustAuth sits between your application and your users — you keep your login UI, we handle secure code delivery over WhatsApp.

01

User enters their number

Your customer types their phone number on your website or app login screen — same flow they already know.

02

Your server requests a code

Your backend calls JustAuth with the user's number. We validate your wallet, create a secure session, and dispatch the code via WhatsApp.

03

User confirms & you verify

The user enters the code on your page. Your server asks JustAuth to confirm it — if valid, you sign them in.

API endpoints

All requests use HTTPS with query parameters. Responses are JSON.

POST /api/v1/send-otp

Generates a secure 6-digit code, stores the session, deducts one verification from your wallet, and delivers the message to the user's WhatsApp.

Parameter Type Required Description
client-id string Yes Your Client ID (available after your first wallet deposit)
api-key string Yes Your API secret key
number string Yes Recipient phone in Indian format (e.g. 919876543210)

Responses

{
  "success": true,
  "message_simulated": "Your verification code is 582931. It will expire in 2 minutes"
}
POST /api/v1/verify-otp

Checks whether the code the user entered is correct and still within the two-minute expiry window.

Parameter Type Required Description
client-id string Yes Your Client ID
number string Yes User's phone number (e.g. 919876543210)
otp string Yes The 6-digit code entered by the user

Responses

{
  "success": true,
  "message": "OTP Verified"
}

Copy-paste integration

Drop these templates into your backend to wire up send and verify in minutes.

// 1. Send OTP to user's WhatsApp
async function sendVerification(phoneNumber) {
  const url = `https://otp.justauth.in/api/v1/send-otp?client-id=YOUR_CLIENT_ID&api-key=YOUR_API_KEY&number=${phoneNumber}`;
  const response = await fetch(url, { method: 'POST' });
  const data = await response.json();
  if (response.ok) {
    console.log('OTP sent successfully!', data);
  } else {
    console.error('Failed to send OTP:', data.message);
  }
}

// 2. Verify code entered by user
async function verifyCode(phoneNumber, code) {
  const url = `https://otp.justauth.in/api/v1/verify-otp?client-id=YOUR_CLIENT_ID&number=${phoneNumber}&otp=${code}`;
  const response = await fetch(url, { method: 'POST' });
  const data = await response.json();
  if (response.ok && data.success) {
    console.log('User verified successfully!');
  } else {
    console.error('Verification failed:', data.message);
  }
}

Ready to go live?

Create account & fund wallet