SMS verification codes (OTP) for Israeli apps
Phone sign-in without building it yourself: one call sends the code, the second checks it. Otipi creates the code, writes the message and counts the attempts.
At a glance
- Calls
- POST /v1/otp/send, then POST /v1/otp/verify
- Channels
- SMS, email with "channel": "email", or a call with "channel": "voice"
- Languages
- Hebrew, Arabic, Russian and English
- Code
- 4 to 8 digits, valid 1 to 30 minutes, 5 attempts
- Test mode
- Free: the answer carries the code itself
Two calls
Send the number and your app name to /v1/otp/send. When the person types the code, send it with the number to /v1/otp/verify: the answer is valid true, or a reason such as a wrong or expired code.
The message is ready
The text of the code comes from a ready-made template in the language you ask for, with your app name in it. You do not store codes and you do not write texts.
Protection against abuse
Each number gets at most 5 codes an hour, and one account sends one number at most 3 SMS in 10 minutes. A code can be tried 5 times. This keeps bots from burning your plan.
Testing without spending
With a test key the answer includes test_code, so automated tests work without a phone. Real test codes go to your own confirmed phone, 5 SMS free, and to your account email.
Example
curl https://otipi.co.il/v1/otp/send \
-H "Authorization: Bearer $OTIPI_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+972501234567","app":"MyApp","language":"he"}'
curl https://otipi.co.il/v1/otp/verify \
-H "Authorization: Bearer $OTIPI_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+972501234567","code":"482917"}'
Questions
Can the code go by email or by a call instead?
Yes. Add "channel": "email" and an email address: the code goes as a letter in the same language. With "channel": "voice" the person gets a call that reads the code aloud twice, in Hebrew; a call counts as 2 SMS of your plan.
Does it work with Supabase Auth?
Yes. Supabase sends its own codes through Otipi with the Send SMS hook. See the Supabase guide.
How long is a code valid?
5 minutes by default. You can set 1 to 30 minutes with ttl_minutes.
Try it in a minute
A free test key right away, no card. Test codes go to your own phone and email.
More guides
- SMS API for Israel
- Supabase phone sign-in for Israel
- Phone sign-in for Lovable, Base44 and Cursor apps
- A Twilio alternative for Israel
- Transactional email API in Hebrew
- A Resend alternative with SMS for Israel
- Send SMS from a website or a form
- How much does an SMS cost in Israel
- SMS with your business name as the sender
- Choosing an SMS provider in Israel