WAHooks
API ReferenceConnections

Get QR Code

Retrieve the QR code for linking a WhatsApp account to a connection.

GET /api/connections/{id}/qr

Returns the QR code as a base64-encoded PNG image. Scan this QR code with your WhatsApp mobile app to link the account to this connection.

The QR code is only available when the connection is in scan_qr status. If the worker pod is still booting, a 503 response will be returned -- poll this endpoint until the QR code becomes available.

Authentication

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token. Format: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the connection.

Response

200 OK
{
  "value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
401 Unauthorized
{
  "statusCode": 401,
  "message": "Unauthorized"
}
404 Not Found
{
  "statusCode": 404,
  "message": "Connection not found"
}
503 Service Unavailable
{
  "statusCode": 503,
  "message": "Worker is booting, please retry in a few seconds"
}

On this page