Skip to main content
GET
/
app
/
logout
Logout
curl --request GET \
  --url https://api.example.com/app/logout \
  --header 'Authorization: <authorization>'
{
  "500": {},
  "code": "<string>",
  "message": "<string>",
  "results": "<string>"
}
Remove the device session from WhatsApp and delete all associated database files.

Authentication

Authorization
string
required
Basic authentication credentials (username:password in base64)

Headers

X-Device-Id
string
Device identifier for multi-device support. Required when multiple devices are registered. If only one device is registered, it will be used as the default.

Response

code
string
Response code indicating success or failureExample: SUCCESS
message
string
Human-readable response messageExample: Success
results
string
Additional result data (typically null)Example: null

Example Request

curl -X GET 'http://localhost:3000/app/logout' \
  -u 'username:password' \
  -H 'X-Device-Id: my-device-id'

Response Example

{
  "code": "SUCCESS",
  "message": "Success",
  "results": null
}

Error Responses

500
object
Internal Server Error
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Failed to logout device",
  "results": null
}

Usage Notes

  • This operation is irreversible - all session data will be permanently deleted
  • After logout, you will need to login again using QR code or pairing code
  • The device will be removed from your WhatsApp linked devices list
  • All local message history and chat data will be deleted from the server

Build docs developers (and LLMs) love