Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Session → Get Status
AI-generatedOverview
This node integrates with the Maytapi WhatsApp Unofficial API, enabling automation and interaction with WhatsApp accounts through various resources such as messages, contacts, chats, groups, queues, calls, sessions, session controls, and account management.
Specifically, for the Session resource with the Get Status operation, the node retrieves the current status of a WhatsApp session associated with a given Phone ID. This is useful to monitor whether the WhatsApp instance is connected, disconnected, or in another state.
Practical scenarios include:
- Monitoring the connection status of your WhatsApp instance before sending messages.
- Automating alerts or workflows based on session connectivity.
- Integrating session status checks into larger communication automation pipelines.
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 use for the session. Required if "Phone ID Source" is set to "Custom". |
Output
The output JSON contains the response from the Maytapi API endpoint that provides the session status for the specified Phone ID. This typically includes details about the session's current state, such as whether it is connected, disconnected, or requires action.
No binary data is output for this operation.
Example output structure (simplified):
{
"status": "connected",
"lastActive": "2024-06-01T12:00:00Z",
"qrCodeRequired": false,
...
}
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 the Maytapi API base URL
https://api.maytapi.com/api.
Troubleshooting
Error: "Phone ID is required."
Ensure that the Phone ID is correctly set either in the credentials or provided as a custom Phone ID when the resource is not "account".Unsupported operation error
If you select an operation not supported by the Session resource, the node will throw an error. Confirm that only valid operations like "getStatus" are used for the Session resource.API request failures
Check that the API key credential is valid and has proper permissions. Also verify network connectivity to the Maytapi API endpoint.
Links and References
- Maytapi Official Website
- Maytapi WhatsApp API Documentation
- n8n documentation on Creating Custom Nodes