Appearance
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
| Scope | Endpoints |
|---|---|
pipelines:read | List pipelines, Retrieve a pipeline — to find your channel id |
whatsapp-qr:read | List chats, List messages, List groups, Retrieve a group, List group participants, Download media |
whatsapp-qr:send | Send 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
| Chat | Format | Example |
|---|---|---|
| Person (phone number) | digits with country code, + optional | 201066278084 |
| Person (WhatsApp id) | …@c.us or …@lid | 201066278084@c.us |
| Group | …@g.us | 120363025988123456@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.urlpoints to our WhatsApp server and doesn't work directly. Pass it aspathto 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
| Code | Meaning |
|---|---|
403 | The token is missing the scope, or the channel isn't yours |
404 | The 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 |
422 | Invalid input (see validation) |
429 | Rate limit reached (30 requests per minute per account). Retry after Retry-After seconds. |
502 | WhatsApp rejected the request or couldn't be reached (e.g. the number is disconnected) |