Guides
API principles

Errors

The Graph API error envelope, the codes the simulator returns synchronously and the ones that arrive by webhook.

Envelope

json
{
  "error": {
    "message": "(#132001) Template does not exist",
    "type": "OAuthException",
    "code": 132001,
    "error_data": { "messaging_product": "whatsapp", "details": "template name (promo_outubro) does not exist in pt_BR" },
    "fbtrace_id": "AsimZ3x8k2Qp"
  }
}
  • code identifies the error; error_subcode refines some (33, 460, 2388024…).
  • error_data.details explains the specific case. It appears in WhatsApp errors (130000 and up) and in many 100s.
  • error_user_title and error_user_msg appear in template errors, as with Meta.
  • HTTP is 400 in most cases, 401 for tokens, 403 for permissions and 503 for unavailability.

Handle errors by code, not by message.

Synchronous errors

CodeHTTPMeaningExample in the simulator
100400Missing or invalid parameterNo messaging_product; malformed PIN
100 / subcode 33400Object does not exist or the token can't see itID of another WABA; deleted media
100 / subcode 2388024400Template with the same name and languageRepeated Create a template
100 / subcode 2388042400Invalid template nameUppercase or spaces
100 / subcode 2593002400Template not foundDelete templates by name
104400No tokenMissing Authorization header
190401Invalid or revoked token (subcode 460)See Authentication
200403App token on a WABA routeUse the sandbox token
2200400Callback handshake failedSubscribe the app
2500400Unknown pathEdge that does not exist
2635400Old Graph API versionv17.0 or earlier
130429400Throughput reachedMore than throughput_mps per second
131008400Required parameter missingInteractive without body.text
131009400Parameter value not valid4 buttons; marketing without template
131021400Recipient is the senderto is the business number
131051400Unsupported message typetype: "poll"
131053400Media upload errorType or size over the limit
131056400Business–customer pair rate limit10 messages to the same number in 60 s
132000400Parameter count mismatchTemplate with 2 variables and 1 parameter
132001400Template does not exist or is not approvedPENDING template
132005400Template text too longOver 1024 characters
132012400Parameter in the wrong formatImage header with text
132015400Template pausedpause review
132016400Template disableddisable review
133005400Wrong two-step verification PINRegister a phone number
133010400Number not registeredDeregister a phone number
136025400Wrong verification codeVerify the code

Asynchronous errors

They arrive in statuses[].errors[] of the messages webhook, with code, title, message, error_data.details and href. The main ones are 131026, 131047, 131049, 131050 and 131056; see Delivery statuses.

Control API errors

The /v1/whatsapp/{slug}/… and /_sim/v1/… routes answer {"error": {"message", "type": "SimulatorException", "code": <HTTP>}} with messages in Portuguese (for example 404 for an unknown contact). The sandbox routes (/v1/whatsapp) use lowercase codes such as sandbox_not_found and wait_timeout. These formats are Mimicr's and do not exist at Meta.