Skip to content

Delete Session

Delete a WhatsApp session.

Usage

The Session facade's delete method may be used to delete a WhatsApp session. By default, it deletes the default session. You can also specify a session name to delete a specific session.

php
use NjoguAmos\Waha\Facades\Session;

/** @var \Saloon\Http\Response $session */
$session = Session::delete();
php
use NjoguAmos\Waha\Facades\Session;

/** @var \Saloon\Http\Response $session */
$session = Session::delete(session: 'custom-session');

Response

The response returned by the delete method is an instance of Saloon\Http\Response. You may use the status method to check the response status:

php
/** @var \Saloon\Http\Response $session */

$session->status(); // 201

Engines

WEBJSWPPNOWEBGOWS

References

Released under the MIT License.