Generate QR code for user
Issues a long-lived WhatsApp QR-code link for a specific user in a partner-managed workspace. If the user already has a connected WhatsApp account, that account is disconnected first and the previous QR link (if any) is revoked. Only one active QR link per user is allowed at any given time; generating a new link invalidates any existing one. The request optionally accepts expires_in_hours (1–168, default 24) to control how long the QR link remains valid. The response includes the workspace_id, user_id, an unguessable qr_link URL, its expires_at timestamp, and flags indicating whether an existing WhatsApp account was disconnected and whether a previously active QR link was revoked. Generating a new QR code link is a destructive action: any currently connected WhatsApp account for this user will be forcibly disconnected.
Path parameters
The unique identifier for the workspace.
The unique identifier for the user.
Headers
The unique identifier for the partner.
Request body
Response
QR code generated
Example response
{
"workspace_id": "my-first-workspace",
"user_id": 42,
"expires_at": "2024-01-01T12:00:00Z"
}