WA Gateway

Errors

Every error the API can answer, why it happens, and what to do.

Errors answer with an HTTP status and a JSON body with one field, error:

{ "error": "Device is not connected" }

Decide what to do from the status. When two errors share a status, as with 402 and 429, read the error text too.

StatuserrorWhyWhat to do
400invalid idThe Device id in the URL isn't a positive whole number.Fix the URL.
400label is required, to and type are required, text is required for type=text, media_url is required for media types, url and secret are requiredA required field is missing.Send the field.
400Unsupported type: …type isn't text, image, document or audio.Use one of those.
400Invalid media URL: …, Failed to download media: …, Refusing to fetch media from a private/reserved address …We couldn't download the file from media_url.Use a public http/https link that works.
400Cap exceeds admin ceilingA Send Cap is above the allowed maximum.Use a lower cap.
401Missing or invalid Authorization headerNo Authorization: Bearer … header.Send your API Key. See Authentication.
401Invalid API keyThe key is wrong or revoked.Check the key, or create a new one.
402No active SubscriptionYour Tenant has no active Subscription.Renew. See Subscription.
402Device Quota reachedYour Plan allows no more Devices.Upgrade your Plan, or delete a Device you don't use.
404Device not foundNo Device with this id in your Tenant.Check the id with GET /v1/devices.
404No QR available. Device may already be connected.No QR code right now.Check the Device's status. Ask again in a few seconds.
409Device is not connectedThe Device isn't connected.Link it again. See Devices.
413Media exceeds … byte limit for type …The file is too big.Images up to 5 MB. Documents and audio up to 16 MB.
429Monthly Message Quota reachedYour Plan's monthly Message Quota is used up.Wait for next month, or upgrade your Plan.
429Rate limit exceeded (hourly cap: 60) or (daily cap: 500)This Device reached a Send Cap.Send later, or from another Device.
500Internal Server ErrorSomething went wrong on our side.Try again later. If it continues, contact us.

Don't retry 400, 401, 402, 404 and 409 without changing something first. The same request fails again. Retry 429 later, and 500 after a short wait.