Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
The "Logout Session" operation in the WAHA API node allows users to log out from a specified WhatsApp session. This is useful for terminating an active session, ensuring that the session is properly closed and no longer connected to WhatsApp. It can be beneficial in scenarios where you want to securely end a session after completing automation tasks or when switching between different WhatsApp accounts.
For example, if you have automated message sending or chat management workflows and want to ensure sessions do not remain open indefinitely, you can use this operation to log out the session programmatically.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to log out from. Typically corresponds to a configured session identifier. |
| Additional Fields | A collection of optional fields (not specifically used in logout but available for other operations). |
Note: For the "Logout Session" operation, only the "Session Name" property is relevant.
Output
The output JSON contains the response from the WAHA API after attempting to log out the session. This typically includes status information about the logout request, such as success confirmation or error details.
Example structure:
{
"status": "success",
"message": "Session logged out successfully"
}
No binary data is involved in this operation.
Dependencies
- Requires an API key credential for the WAHA API to authenticate requests.
- Optionally uses another API key credential for an auxiliary validation service ("N8N Tools API") to verify subscription and API key validity before making the main request.
- The node expects the base URL and API key for the WAHA API to be configured in credentials.
- The session name must correspond to an existing WhatsApp session managed by the WAHA API.
Troubleshooting
- Invalid Subscription or API Key: If the auxiliary validation fails with HTTP 401 or 403, it indicates invalid or expired API keys. Verify and update your credentials.
- Unknown Session Name: If the session name does not exist or is incorrect, the API may return an error indicating the session was not found. Ensure the session name matches an active session.
- Network Issues: Connectivity problems to the WAHA API endpoint will cause request failures. Check network access and API endpoint availability.
- Unhandled Operation Errors: If an unsupported operation is selected, the node throws an error indicating an unknown operation. Confirm the operation is set to "Logout Session" under the "Session" resource.
Links and References
- WAHA API Documentation (Replace with actual URL if available)
- n8n Documentation on Creating Custom Nodes
- General WhatsApp Automation Concepts: WhatsApp Business API
This summary focuses exclusively on the "Logout Session" operation within the "Session" resource of the WAHA API node based on static code analysis.