Remove the device session from WhatsApp and delete all associated database files.
Authentication
Basic authentication credentials (username:password in base64)
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
Response code indicating success or failureExample: SUCCESS
Human-readable response messageExample: Success
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
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