Skip to Content

Events & Errors

Events

Inbound webhooks flow through the same typed event system as the unofficial provider — see Events for the shared model, handler signatures, and payload shapes. The table below adds the cloud-only events and notes which shared events the Cloud API can emit.

EventProviderFires when
message, text, image, video, audio, document, stickershareda user sends that message type
reactionshareda user reacts to a message
button-click, list-selectshareda user taps a reply button or picks a list row
location, contactshareda user shares a location or contact
flow-response☁️ cloud-onlya user completes a WhatsApp Flow (nfm_reply) — carries parsed response
order☁️ cloud-onlya user places a catalog order — carries items
message-status☁️ cloud-onlyyour outbound message is sent / delivered / read / failed
template-status☁️ cloud-onlya template becomes APPROVED / REJECTED / PAUSED
wa.on('message-status', (s) => console.log(s.id, s.status, s.recipientId)) wa.on('template-status', (t) => console.log(t.name, t.event)) wa.on('flow-response', (f) => console.log(f.response)) wa.on('order', (o) => console.log(o.items))

qr, pairing-code, and reconnect events never fire on the cloud provider — authentication is token-based and there is no socket lifecycle.

message-status payload

FieldTypeNotes
idstringThe wamid of your outbound message.
status'sent' | 'delivered' | 'read' | 'failed'Delivery stage.
recipientIdstringRecipient JID.
timestampnumberUnix seconds.
error?{ code, title, message }Present on failed.

Error codes

Every failure surfaces as a typed ZaileysCloudError carrying the Graph code. The most common:

CodeMeaningFix
131047Re-engagement — outside the 24h windowSend an approved template first
132000Parameter count mismatchMatch parameters to the template’s {{n}}
131026Message undeliverableRecipient can’t receive (no WhatsApp, blocked)
131056Pair rate limitSlow down; respect messaging tiers
100Invalid parameter / bad requestCheck the payload shape
190Invalid / expired access tokenRegenerate a permanent System User token
133xxxRegistration errorsSee phone management
import { ZaileysCloudError } from 'zaileys' try { await wa.send(to).text('hi') } catch (err) { if (err instanceof ZaileysCloudError && err.code === 'REQUEST_FAILED') { // err.message includes the Graph code, e.g. "(#131047) …" } }

See Error Handling for the full error taxonomy shared across both providers.

Last updated on