Skip to content

WhatsApp QR Code — overview ​

These endpoints let you work with a WhatsApp number connected to Genudo by QR code. You can read its chats, messages and groups, download media, and send text, images, files, voice notes and videos — to people or to groups.

They don't work with WhatsApp Business (Meta Cloud API) channels.

Scopes ​

ScopeEndpoints
pipelines:readList pipelines, Retrieve a pipeline — to find your channel id
whatsapp-qr:readList chats, List messages, List groups, Retrieve a group, List group participants, Download media
whatsapp-qr:sendSend text, Send media

1. Find your channel id ​

Call List pipelines (or Retrieve a pipeline) and take the id of a channel whose connector is whatsapp-qr and whose status is active:

json
"channels": [
  { "id": 105, "identifier": "201142407509@c.us", "status": "active", "provider": "whatsapp", "connector": "whatsapp-qr" }
]

Every WhatsApp QR Code endpoint starts with /api/user/whatsapp-qr/channels/{channel}. The channel must be active: a pending or inactive channel returns 404 on every endpoint, including Download media.

2. Chat ids ​

ChatFormatExample
Person (phone number)digits with country code, + optional201066278084
Person (WhatsApp id)…@c.us or …@lid201066278084@c.us
Group…@g.us120363025988123456@g.us

A bare phone number is sent as …@c.us. Take group ids from List groups, and existing chat ids from List chats.

Good to know ​

  • History. Chats and messages are only available from when the number was connected to Genudo. Older WhatsApp history isn't synced.
  • Media. A message's media.url points to our WhatsApp server and doesn't work directly. Pass it as path to Download media.
  • Rate limit. Every request, including sends, counts toward your account's 30 requests per minute. Above it you get 429. See Rate limits for headers and retrying.

Errors ​

CodeMeaning
403The token is missing the scope, or the channel isn't yours
404The channel isn't an active, connected WhatsApp QR Code channel (its status is pending or inactive, or it isn't a WhatsApp QR Code channel), or the file doesn't exist
422Invalid input (see validation)
429Rate limit reached (30 requests per minute per account). Retry after Retry-After seconds.
502WhatsApp rejected the request or couldn't be reached (e.g. the number is disconnected)