Skip to main content
GET
Get a session's QR code
After creating an unofficial session, connect it by scanning the QR code with WhatsApp on your phone (Linked devices → Link a device). Use ?image=1 to receive the QR directly as a PNG image. Without the parameter, the response contains the QR data as JSON, ideal for rendering the code in your own front end.
The QR code expires within seconds and is renewed automatically. Call the endpoint again to get an updated code while the session is not connected.
A session that spends 45 minutes generating QR codes without being connected, and without any calls to this endpoint, is hibernated and fires the connection.status webhook with qrcode_timeout. The next call wakes the session up: it responds with expired: true and the new QR appears within a few seconds.

Authorizations

Authorization
string
header
required

API Key for authentication. Format: <API_KEY>

Path Parameters

sessionId
string
required

Session identifier

Query Parameters

image
enum<string>

Set to "1" to return PNG image directly instead of JSON

Available options:
1

Response

QR code data (JSON) or PNG image (when ?image=1)

sessionId
string
required

Session identifier

status
string
required

Session connection status

qrCode
string

Raw QR code text for WhatsApp connection

qrCodeImage
string

Base64 data URL of QR code PNG image

qrCodeUpdatedAt
string<date-time>

Timestamp when QR code was last updated