# (WhatsApp Lite) Connection

Connect and manage WhatsApp Lite sessions. Establish a connection by scanning a QR code (via WebSocket stream or static image) or by entering a pairing code. Monitor session status, configure webhooks for the number, and log out when needed. WhatsApp Lite requires an active phone connection — if the phone goes offline, the session disconnects.

 - [GET /](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/connectwebsocket.md): **Protocol:** `WSS` (WebSocket Secure) Establish a WebSocket connection to receive real-time QR code updates. **Incoming Message Format (Regex):** ``` /userId=(.+?), sessionStatus=(.+?), status=(.+?)
 - [POST /whatsapp-api-service/api/whatsapp-go/session/connect](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/connectsession.md): Initializes a WhatsApp session. After calling this, connect to the WebSocket to receive the QR code.
 - [POST /whatsapp-api-service/api/whatsapp-go/session/webhook](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/setlitewebhook.md): Register a webhook URL to receive incoming messages and events for a WhatsApp Lite number.
 - [GET /whatsapp-api-service/api/whatsapp-go/session/qr](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/getqrcode.md): Retrieve the current QR code as a Base64 string if WebSocket method is not used.
 - [POST /whatsapp-api-service/api/whatsapp-go/session/pairing-code](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/requestpairingcode.md): Generates an 8-character linking code for the "Link with phone number" option.
 - [GET /whatsapp-api-service/api/whatsapp-go/session/status](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/getsessionstatus.md): Check the current connection status of a WhatsApp Lite session. Returns whether the number is connected, disconnected, or requires a QR scan.
 - [POST /whatsapp-api-service/api/whatsapp-go/session/logout](https://docs.ecommunicate.co.za/apis/omnichannel/(whatsapp-lite)-connection/logoutsession.md): Logs the number out of WhatsApp Web/Multi-device session.
