WasenderAPI

API Documentation

WasenderApi WhatsApp API

Get WhatsApp Session Status

Sessions

GET/api/status

Returns the current status of the connected WhatsApp session.

Get WhatsApp Session Status

This endpoint returns the current status of a specific WhatsApp session. The session must be previously initialized and authenticated.

Session Statuses Explained

The following are the possible statuses that may be returned by this endpoint:

  • connecting — The session is attempting to establish a connection with WhatsApp servers. This typically occurs right after initialization.
  • connected — The session is successfully authenticated and actively connected to WhatsApp. You can send and receive messages.
  • disconnected — This is the first status before the user attempts to connect. Once the user tries to connect, this status will no longer be shown.
  • need_scan — This status means the session needs to be scanned with a QR code. It usually occurs when initializing a new session or if the previous session is no longer valid.
  • logged_out — The user has logged out of the WhatsApp session either manually or from another device. You'll need to re-authenticate by scanning a QR code again.
  • expired — The session is no longer valid, often due to extended inactivity or because it was invalidated remotely. Reinitialization is required.

Code Examples

curl "https://www.wasenderapi.com/api/status"
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "status":"connected"
}