TOVII
🔑 TOVII Developers

Login with TOVII

Let people sign in to your website or app with their mobile number. We deliver a one-time code to their TOVII app – no SMS gateway, no SIM delays – and you check it with one API call.

Overview

The OTP API has two calls: send a code to a mobile number, and verify the code the person types. Every call uses your secret API key. Base URL: https://api.iindus.in/v1/otp

  • Codes are 6 digits, valid for 5 minutes, and work once.
  • The number must belong to an TOVII account.
  • The code arrives in the TOVII app from the official, read-only TOVII Verify account, showing your app’s name.

How it works

1. Your pageThe visitor picks “Login with TOVII” and types their mobile number.
2. Your server → sendYou call /send. We deliver the code to their TOVII app.
3. Their phoneThey open TOVII, see “123456 is your code to sign in to YourApp” and type it.
4. Your server → verifyYou call /verify. If verified is true, log them in.

Get an API key

API keys are issued by the TOVII team. Write to contact@iindus.in with your app name, website and expected daily logins. You’ll receive a key like iik_3fa91c0d2e_…. It is shown only once – store it as a server secret (for example the environment variable IINDUS_API_KEY).

1. Send a code

POST https://api.iindus.in/v1/otp/send with header X-Api-Key (or Authorization: Bearer …).

FieldTypeDescription
phonestring10-digit Indian mobile number (9876543210) or international (+919876543210)
curl -X POST https://api.iindus.in/v1/otp/send \
  -H "X-Api-Key: $IINDUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "9876543210"}' 

Response 200:

{
  "requestId": "1f0c2b7e-5d1a-4c55-9a51-0b8f3c1e9d2a",
  "sentTo": "+91••••••3210",
  "expiresIn": 300
}

Keep requestId on your server (for example in the session); you need it to verify.

2. Check the code

POST https://api.iindus.in/v1/otp/verify

FieldTypeDescription
requestIdstringFrom the send response
codestringThe 6 digits the person typed
curl -X POST https://api.iindus.in/v1/otp/verify \
  -H "X-Api-Key: $IINDUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"requestId": "1f0c2b7e-…", "code": "123456"}' 

Right code:

{ "verified": true, "phone": "+919876543210", "name": "Priya Sharma" }

Wrong code:

{ "verified": false, "error": "wrong_code", "attemptsLeft": 4 }

Examples

// server.js (Node 18+). Keep the key on your server – never in the browser.
const IINDUS = 'https://api.iindus.in/v1/otp';
const headers = { 'X-Api-Key': process.env.IINDUS_API_KEY, 'Content-Type': 'application/json' };

// POST /login/start  { phone }
app.post('/login/start', async (req, res) => {
  const r = await fetch(IINDUS + '/send', { method: 'POST', headers, body: JSON.stringify({ phone: req.body.phone }) });
  const data = await r.json();
  if (!r.ok) return res.status(r.status).json(data);       // e.g. not_on_iindus
  req.session.otpRequest = data.requestId;                  // remember it server-side
  res.json({ sentTo: data.sentTo });
});

// POST /login/verify  { code }
app.post('/login/verify', async (req, res) => {
  const r = await fetch(IINDUS + '/verify', {
    method: 'POST', headers, body: JSON.stringify({ requestId: req.session.otpRequest, code: req.body.code }),
  });
  const data = await r.json();
  if (!data.verified) return res.status(400).json(data);
  req.session.user = await findOrCreateUserByPhone(data.phone, data.name);
  res.json({ ok: true });
});

Login button

Use this button on your sign-in page. It should lead to your own page that asks for the mobile number and code.

<button class="iindus-login" type="button" onclick="location.href='/login/iindus'">
  <img src="https://iindus.in/assets/mark-96.png" alt="" width="44" height="20">
  Login with TOVII
</button>

<style>
.iindus-login { display:inline-flex; align-items:center; gap:10px; background:#2e3a59; color:#fff;
  border:0; border-radius:12px; padding:12px 18px; font:600 16px system-ui,sans-serif; cursor:pointer }
.iindus-login img { width:24px; height:24px; background:#fdf9f6; border-radius:6px; padding:2px }
</style>

Errors & limits

StatuserrorMeaning
401–Missing or wrong API key
403–Key has been turned off
400invalid_phoneThe number isn’t valid
404not_on_iindusNo TOVII account for this number – offer another login method
429too_many_codesMore than 5 codes to one number in 15 minutes
429daily_limitYour key’s daily limit is reached
200wrong_codeWrong code; attemptsLeft tells how many tries remain (5 in total)
200expiredMore than 5 minutes passed – send a new code
200already_used / too_many_attemptsSend a new code

Security tips

  • Call the API only from your server. Never put the key in an app, web page or public repository.
  • Store requestId server-side and tie it to the visitor’s session.
  • Add your own rate limit per visitor and per IP for the “send code” button.
  • If a key leaks, ask the TOVII team to replace it – the old key stops working immediately.

FAQ

Does the person need the TOVII app?

Yes. The code is delivered inside the TOVII app, so the mobile number must have an TOVII account. If not, send returns not_on_iindus and you can offer another way to log in.

Do you send an SMS?

No. Codes arrive in the app from the official “TOVII Verify” account, with a notification. There is no SMS cost and no SIM delay.

What do I get after a successful check?

The verified mobile number (E.164, e.g. +919876543210) and the person’s TOVII display name.

Is it free?

Ask the TOVII team about plans and daily limits when you request your key.