Common HTTP API Errors and How to Fix Them

Common HTTP API Errors and How to Fix Them

HTTP code Probable cause Solution
400 Missing or invalid parameter (misformatted number, missing required field, invalid Sender ID) Check your JSON request format and number format (+212...)
401 API key missing, invalid or expired Check the Authorization header and regenerate the key if necessary
402 Insufficient balance on account (INSUFFICIENT_BALANCE) Top up your account (top-ups are manual, there is no automatic top-up)
403 Action not allowed for this API key (Scope/IP restriction) Check the permissions associated with the key used
404 Resource not found (e.g. message_id does not exist) Check the ID used in the URL
429 Rate limit exceeded (RATE_LIMITED) Wait for the delay given by the Retry-After header (60 seconds), then retry with a progressive delay
500 Internal error on platform side Contact support with the time of the request and the returned error.code

Each error response includes a JSON body with an error.code and error.message field detailing precisely the cause.

Was this article helpful?