The SMS verification code did not arrive: what to check, on your side and the customer's

WhatsApp & APIs·· 17 views· 3 min read

The short answer: when a customer says the code did not arrive, check your own side first: the key (a Sandbox key sends nothing), the response to the request, the number and the SMS balance. Then look at the code's status with GET /v1/sms/otp/{id}. Only then move on to the customer's phone: signal, SIM, blocked messages. And do not allow endless resends: each new code cancels the previous one.

On your side

Check How If this is it
Is it a Sandbox key? The response shows "mode": "sandbox" and "simulated": true No SMS goes out in the Sandbox. Use a prod_ key
Was the request accepted? The HTTP code: 201 means accepted A 403 or 422 sent nothing; read error.code and details
Is the number right? The to field shows the masked number One wrong digit sends it to someone else. Sending is only to Mozambique and Angola
Are there credits? GET /v1/sms/balance Buy credits on the SMS page in Meu Interweb
Is the sender approved? GET /v1/sms/senders The sender must be approved for the number's country; without it NETMSG is used
Did another code go out later? GET /v1/sms/otp/{id}: status cancelled The customer is looking at an old SMS; only the latest works

Verification codes are not listed among the API's messages (GET /v1/sms/messages). To look up a code, always use GET /v1/sms/otp/{id} with the id you kept.

On the customer's side

1 Signal. Without mobile signal the SMS waits. It needs no internet or apps, but it does need a network.
2 The right SIM. On a dual-SIM phone, the code goes to the number that was typed, which may not be the main card.
3 Blocked or filtered messages. Some SMS apps hide messages from unknown senders in a separate folder.
4 Full memory or a message inbox at its limit, on older phones.
5 Wait a little before asking for another. Pressing “Resend” several times brings several SMS, and only the last one works.
Resending has rules too. /resend only works for pending or expired codes, and attempts already used do not come back. If the code failed or was cancelled, request a new one with POST /v1/sms/otp. See resending, cancelling and replacing a code.
If none of this explains it, open a support ticket with the code's id (otp_...), the time it was sent and the X-Correlation-ID from the response. Never send the API key: support does not need it.

A code still not arriving after checking everything? Open a support ticket with the code id.

Open a support ticket

SEE ALSO

Resending, cancelling and replacing a verification code: what happens to the old one

Verification code statuses: pending, verified, expired, failed and cancelled

Reading the verification API's answers: valid false, 409, 422 and 429

The code entry screen: the field, a countdown, attempts left and clear messages

Testing SMS verification in the Sandbox: the code comes back in the response

SMS API errors and message statuses: what each one means and what to do

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $5.36/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.