Create a WhatsApp Session (QR / Pairing Login)

View All WhatsApp Messaging API APIs →

Start logging in to your WhatsApp account and obtain the sessionId used by every other endpoint. There are two login modes — pick one and send its JSON body below, then poll Get Session Status until status reads CONNECTED. QR login (recommended). Body: {"mode":"qr","deviceName":"My Bot"}. The status response carries a scannable qrImage (base64 data-URI) and a qrPageUrl you can open to watch login live. On your phone: WhatsApp → Settings → Linked Devices → Link a device, then scan the QR. Pairing-code login. Body: {"mode":"pairing","phoneNumber":"8613800138000","deviceName":"My Bot"}. phoneNumber is your full international number, digits only, no + and no spaces. The status response then returns an 8-character pairingCode. On your phone: WhatsApp → Settings → Linked Devices → Link a device → Link with phone number instead, and type the code. After connecting, the sessionId becomes a stable ID derived from the device, reusable across restarts. deviceName sets the label shown under WhatsApp's Linked Devices.

API Features

QR or pairing login Link your account by scanning a QR code or entering a pairing code on your phone — no lengthy approval process
Live login status Poll the session to receive the QR image or pairing code and watch the status move to CONNECTED
Stable reusable sessionId Once connected, the id becomes a deterministic device-derived ID that survives restarts and authorizes every endpoint
Named linked device Set deviceName to control the label shown under WhatsApp's Linked Devices for auditing

Live API Demo

POST /api/project/whatsapp-messaging/create-session

API Response (JSON)

{}
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

View Subscription Plans →