Phone verification by SMS in two API calls
Meser 10 Verify creates the code, sends it, checks it and limits guesses and repeat sends. You make two calls, one to send and one to check, and you never store codes yourself.
Get startedWhat you do not have to build
Creating and storing codes
A 6-digit code is created on our side and stored only as a hash. It is never returned to you in any response.
Expiry
A code is valid for 5 minutes by default. You can set anything from 1 to 15 minutes on each send.
Limit on guesses
After 5 wrong attempts the request is blocked, and every wrong answer tells you how many attempts are left.
Limit on repeat sends
Per number: 30 seconds between sends, up to 3 in 10 minutes and up to 10 in 24 hours. Per account: up to 2,000 sends a day.
Message text without links
Ready texts exist in Hebrew and English. You can write your own, but it must contain the code once and cannot contain a link or a phone number. This makes it harder to misuse the service for impersonation messages.
Phone numbers
The number is stored only as a keyed hash (HMAC) with a masked form for display, and deleted after 48 hours. Example: 050*****67.
Quick start
Full guide with Node.js and PHP code and troubleshooting: Verify support guide.
- Open a Meser 10 account and issue an API key in the advanced settings.
- Verify a sender name (2 to 11 Latin letters, digits or spaces) or a sender number.
- Ask support to enable Verify for your account. You get an access token (
X-Verify-Token). Keep it on your server only, like the key. - Send a code, then check what the user typed.
Send a code
curl -sS -X POST "https://verify.mesereser.com/v1/send" \
-H "ApiKey: $MESER10_API_KEY" \
-H "X-Verify-Token: $MESER10_VERIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"phone":"0501234567","from":"MyShop","lang":"en"}'
{"ok":true,"id":"<request-id>","expires_in":300,"phone":"050*****67"}
Check the code the user typed
curl -sS -X POST "https://verify.mesereser.com/v1/check" \
-H "ApiKey: $MESER10_API_KEY" \
-H "X-Verify-Token: $MESER10_VERIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id":"<request-id>","code":"481902","phone":"0501234567"}'
{"ok":true,"verified":true,"phone":"050*****67"}
The phone field in the check is required: the code is accepted only for the number it was sent to, and a number that does not match counts as a wrong attempt.
Call the service from your server only. The key is a full account key and must never be placed in a browser or an app.
Reference: fields, responses and errors
Machine-readable version: openapi.json (OpenAPI 3.1). Code in Node.js, PHP, Python, cURL and C# is in the support guide. Test mode: a test token sends no SMS and returns test, test_code and message. Autofill: autofill is web or android; errors autofill_not_configured (no domain or app hash on the token yet) and invalid_autofill.
Send fields (POST /v1/send): phone an Israeli mobile (05X, also 972 or +972). from a verified sender name (2 to 11 Latin letters, digits or spaces) or a verified sender number (0 plus 8 to 9 digits). lang is he or en (anything else is treated as he). ttl validity in seconds, 60 to 900 (values outside the range are moved to the nearest end). template your own text, optional.
Template rules: {code} exactly once. Hebrew and Latin letters, digits, spaces and basic punctuation only. No links or link shorteners, no phone numbers, and no words such as card, password or bank. Up to 70 characters when the text has Hebrew and 160 when it is Latin only, so it fits in one SMS.
On check (POST /v1/check) send the same ApiKey and the same token as the send. A different key gets not_found.
A check response comes back as 200. Only a verified code returns "ok":true. When the code is not verified you get "ok":false and "verified":false, with the reason in the error field (also in reason), for example:
{"ok":false,"verified":false,"error":"wrong_code","reason":"wrong_code","attempts_left":3}
| error / reason | Meaning and what to do |
|---|---|
wrong_code | Wrong code, with attempts_left. At 0 the request is blocked. |
phone_mismatch | The number in the check is not the one the code went to. Counts as an attempt. |
expired | Expired, or a newer code was sent to the same number. Send or check the new one. |
blocked / too_many_attempts | No attempts left. Send a new code. |
already_used | The code was already verified once. |
not_found | No such request for this key. |
Errors come with "ok":false and the name in the error field:
| error | HTTP | What to do |
|---|---|---|
not_enabled | 403 | Token missing, wrong, or turned off by support. Contact support. |
invalid_api_key | 401 | The ApiKey header is missing or malformed. |
auth_failed / send_failed | 401 / 400 | The key was refused, the sender is not verified or there is no balance. Do not retry automatically: check the key, the sender and the balance. |
sender_not_verified, no_credits, rejected | 502 | Sender not verified, no SMS balance, or the send was refused. |
upstream_uncertain | 502 | Not certain the SMS went out. The response includes an id: keep it, the code is valid and can be checked. Do not resend right away. |
upstream_blocked | 502 | A temporary problem on our side. Retry in a few minutes. |
too_soon | 429 | Less than 30 seconds since the last send to that number. Wait retry_after seconds. |
phone_rate_limited | 429 | Up to 3 sends in 10 minutes and 10 in 24 hours to one number from one account, and up to 30 an hour to one number from all accounts together. |
account_daily_limit | 429 | The account reached 2,000 sends today. The counter resets at midnight UTC. |
too_many_requests | 429 | Too many calls per minute (send and check). Slow down. |
key_refused | 401 | The Meser 10 API refused the ApiKey. Sends pause for 15 minutes (longer if it repeats) and resume by themselves; checks keep working. Fix the key. |
token_daily_limit | 429 | This token reached its daily send limit (2,000 unless support set another). Resets at midnight UTC. |
phone_required | 400 | The check did not include phone. Send the number the code went to. |
too_many_failures | 429 | Many refused sends in 10 minutes. Check the cause before continuing. |
temporarily_unavailable | 503 | The service holds sends to protect all accounts, from 1 second to 15 minutes. Wait retry_after seconds. |
invalid_phone, invalid_from, template_*, invalid_input, invalid_json | 400 | The request is invalid. Fix the field. |
payload_too_large | 413 | Request body over 4 KB. |
forbidden, method_not_allowed, not_found | 403 / 405 / 404 | Wrong address or method. Send POST to /v1/send or /v1/check. |
internal_error | 500 | A fault on our side. Retry later. |
Retry rule of thumb: on 429 and 503 wait retry_after. On 400, 401 and 403 do not retry before fixing. On upstream_uncertain do not send a new code; check the existing one by its id.
An account that restricts its API to specific IP addresses cannot use Verify, because the service calls from Cloudflare addresses. In that case contact support.
Cost and access
The SMS is sent through your own Meser 10 account and charged there like any SMS.
The service is opening gradually. To get access for your account, contact support. This page in Hebrew.
Questions
How is this different from sending a code through the regular API?
With the regular API you create, store and check the code and limit attempts yourself. Here all of that happens on our side, and you get a yes or no.
Can I change the message text?
Yes, with the template field. The text must contain {code} once, no links, no phone numbers and no words such as card, password or bank, and fit in a single SMS.
Which numbers can I send to?
Israeli mobile numbers only (05X, also in 972 format). The restriction prevents misuse for expensive international sending.