WasenderApi - Low Cost WhatsApp API for Developers Connect WhatsApp Session - API Documentation - WasenderApi - Low Cost WhatsApp API for Developers
WasenderAPI

API Documentation

WasenderApi WhatsApp API

Connect WhatsApp Session

Sessions

POST/api/whatsapp-sessions/{whatsappSession}/connect

Initiates the connection process for a WhatsApp session using QR code or Passkey. QR is the default method.

Connect WhatsApp Session

Initiates the connection process for a WhatsApp session. Requires an active subscription.

This endpoint requires an access token in the Authorization header. You can create one from API tokens.

Linking Methods

By default, this endpoint starts the normal WhatsApp QR linking flow.

You can request Passkey linking by sending linkMethod: "passkey". Passkey linking uses the browser extension or desktop helper to approve a WhatsApp passkey prompt.

Default: If linkMethod is omitted, the API uses qr.

Fallback: If WhatsApp does not complete the Passkey continuation, the session may return to NEED_SCAN so the user can continue with QR linking.

Parameters

NameTypeRequiredDescription
whatsappSessionintegerYesID of the WhatsApp session.
linkMethodstringNoOptional linking method. Use qr or passkey. Defaults to qr.

Code Examples

curl -X POST "https://www.wasenderapi.com/api/whatsapp-sessions/{whatsappSession}/connect" 
  -H "Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "linkMethod": "passkey"
  }'

Response Examples

{
  "success": true,
  "data": {
    "status": "NEED_SCAN",
    "qrCode": "2@DTMUHeYfa9/RMXr8A2IP3/..."
  }
}