1. The Sender ID is not whitelisted with the operator concerned A Sender ID can be validated with Maroc Telecom, but not yet active with Orange or inwi. This is the number one reason for receiving disparities. If the API returns a HTTP 400 or 403 with a message mentioning a Sender ID restriction, this is where it should be digged. Multi-operator activation is never instantaneous.
In Morocco, the local format (06XXXXXXXX or 07XXXXXXXX) must be converted to the international format (2126XXXXXX) before sending. If your backend or front-end form does not force this conversion, the operator will reject the request with an HTTP error 400 Bad Request (Invalid Destination Address).
3. Network saturation at peak hours On Ramadan nights (just before or after the Ftour) or on the Eid days, SMS traffic explodes. Operators set up waiting rows (throttling). An OTP SMS that normally takes less than 3 seconds can take 15 to 20 minutes to arrive. In this case, your status will remain blocked on Pending.
Content is detected as SPAM If your OTP includes short links (bit.ly), non-standard characters, or blacklisted keywords (“free”, “win”), the network anti-spam filter can silently block it. The API can return a ‘Delivered’ status while the message is blocked on the operator’s side. Stay on an ultra-basic format: “Your validation code is: 123456.”
A encoding error (Unicode vs. GSM-7) If you send an OTP message in Arabic without configuring the UCS-2 (or Unicode) encoding in the headers of your API query, the message may come in the form of query points (????) or be split and rejected.
6. The recipient’s mobile is offline This seems obvious, but a phone in airplane mode, off, or without network coverage will not receive the message. The operator will keep the SMS in line for a limited period (the Validity Period, often 24h to 48h) before abandoning it permanently (status Failed).
An error '401 Unauthorized' or '402 Payment Required' in your logs usually indicates that your credit balance is exhausted, or that your account has been suspended for suspicious activity (abnormally high volume).