GET
/api/statusReturns the current status of the WhatsApp session, including QR and Passkey linking states.
Get WhatsApp Session Status
This endpoint returns the current status of a specific WhatsApp session. The session must be previously initialized.
Session Statuses Explained
The following statuses may be returned by this endpoint:
| Status | Meaning | Recommended action |
|---|---|---|
connecting |
The session is attempting to establish a connection with WhatsApp servers. | Wait and check the status again. |
connected |
The session is authenticated and actively connected to WhatsApp. | You can send and receive messages. |
disconnected |
The session is not currently connected. | Start the connect flow again using QR or Passkey. |
need_scan |
The session is waiting for the user to scan a WhatsApp QR code. | Show the QR code to the user or call the QR code endpoint to refresh it. |
need_passkey |
The session is waiting for the user to approve a WhatsApp Passkey linking request. | Fetch the Passkey token and ask the user to complete approval with Device Link Helper. |
logged_out |
The user logged out of the WhatsApp session manually or from another device. | Ask the user to reconnect the session using QR or Passkey. |
expired |
The session is no longer valid, often due to inactivity or remote invalidation. | Reconnect the session. |
Passkey note: When the status is need_passkey, call the Passkey token endpoint and show the temporary token to the user. The user can paste it into the Device Link Helper Chrome extension to finish linking.
Passkey fallback: If Passkey linking cannot continue, the status may return to need_scan. In that case, show the normal QR linking flow.
Code Examples
curl "https://www.wasenderapi.com/api/status"
-H "Authorization: Bearer YOUR_API_KEY"Response Examples
{
"status": "connected"
}