Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Session → Logout
AI-generatedOverview
This node integrates with the Maytapi WhatsApp Unofficial API, enabling automation of various WhatsApp-related actions. Specifically for the Session - Logout operation, it allows you to log out from a WhatsApp session associated with a particular phone instance.
Common scenarios where this is useful include:
- Automating session management in workflows that require disconnecting a WhatsApp session remotely.
- Logging out sessions as part of maintenance or security procedures.
- Resetting connections before reconnecting or switching accounts.
Example use case:
- After completing a batch message sending process, automatically log out the WhatsApp session to free resources or enforce session policies.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID: either "From Credentials" (uses Phone ID stored in credentials) or "Custom" (enter a custom Phone ID). |
| Phone ID | The WhatsApp instance Phone ID to target for logout. Required if "Phone ID Source" is set to "Custom". |
Output
The output JSON contains the response from the Maytapi API logout endpoint for the specified Phone ID session. It typically includes success status and any relevant messages confirming the logout action.
No binary data is output by this operation.
Example output JSON structure:
{
"success": true,
"message": "Logged out successfully"
}
Dependencies
- Requires an API key credential for Maytapi WhatsApp API access.
- The Phone ID must be provided either via credentials or manually as a custom input.
- The node makes HTTP requests to
https://api.maytapi.com/api/{phoneId}/logoutendpoint.
Troubleshooting
Error: "Phone ID is required."
This occurs if no Phone ID is provided either in credentials or as a custom value. Ensure you have set the Phone ID correctly.API errors related to invalid or expired sessions:
If the session is already logged out or invalid, the API may return an error. Verify the session state before attempting logout.Network or authentication errors:
Check your API key credential validity and network connectivity to the Maytapi API.
Links and References
- Maytapi Official Website
- Maytapi API Documentation (for detailed API endpoints and parameters)