DocsWebsitePricingSupportConsole
OTP

OTP

Confirm that a person owns a phone number with two calls. We make the code, send it by the channel that reaches them, check what they typed and expire it, so you never store one.

How it works#

  1. Ask for a code. POST /v1/verifications with the phone number.
  2. We send it. By Telegram when the number has an account, otherwise by SMS. If a Telegram code isn't delivered in time, the same code follows by SMS.
  3. Check what they typed. POST /v1/verifications/check answers yes or no. A code works once, expires, and stops after too many wrong tries.
1. Send a code
curl https://api.siellabs.com/v1/verifications \
  -H "Authorization: Bearer $SMSGW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "+447700900123"}'
2. Check it
curl https://api.siellabs.com/v1/verifications/check \
  -H "Authorization: Bearer $SMSGW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "+447700900123", "code": "482913"}'

What you pay#

You pay for the channel that carried the code. A Telegram code is charged when it goes out and refunded if it isn't delivered, so a code that falls back costs the SMS alone. An SMS code costs what any of your messages to that destination costs. See prices on the OTP page of the console.

Next#