Skip to main content
GET /v1/instances/:instanceId/configure Returns a Base64-encoded QR code that you scan with WhatsApp to link a phone number to this instance. After scanning, the instance status transitions to CONFIGURED and eventually ACTIVE.

Request

Headers

HeaderValue
AuthorizationBearer <token>

Path parameters

ParameterTypeDescription
instanceIdstringThe instance ID to configure

Response 200

FieldTypeDescription
instanceIdstringThe instance ID
qrCodeBase64stringBase64-encoded QR code image
messagestringAdditional status message
{
  "instanceId": "inst_abc123",
  "qrCodeBase64": "iVBORw0KGgoAAAANSUhEUgAA...",
  "message": "Scan with WhatsApp to link your number"
}

Decoding the QR code

Convert qrCodeBase64 to an image and display it for scanning:
const img = document.createElement("img");
img.src = `data:image/png;base64,${response.qrCodeBase64}`;
document.body.appendChild(img);

Errors

CodeDescription
401Missing or invalid token
404Instance not found or does not belong to the user

Example

curl https://cawme.com/api/v1/instances/inst_abc123/configure \
  -H "Authorization: Bearer <token>"