Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Account → List Phones
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 accounts. Specifically, for the Account resource with the List Phones operation, it retrieves a list of all registered phones associated with the user's Maytapi product.
Common scenarios where this node is beneficial include:
- Managing multiple WhatsApp phone instances linked to a single Maytapi account.
- Automating workflows that require fetching available phone IDs before sending messages or performing other operations.
- Monitoring or auditing the phones registered under a Maytapi product.
Practical example:
- You want to retrieve all WhatsApp phone numbers registered in your Maytapi product to display them in a dashboard or use them dynamically in subsequent workflow steps.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID when required by operations other than Account resource. Options: "From Credentials" (use Phone ID stored in credentials), "Custom" (enter a custom Phone ID). Not applicable for Account resource operations. |
| Phone ID | When "Phone ID Source" is set to "Custom", enter the WhatsApp instance Phone ID here. Required if custom source is selected. Not applicable for Account resource operations. |
Note: For the Account - List Phones operation, no additional input properties are required beyond selecting the resource and operation.
Output
The output JSON contains the response from the Maytapi API endpoint /listPhones, which returns an array or object representing all registered phones for the product. The exact structure depends on the Maytapi API but typically includes details like phone IDs, phone numbers, status, and related metadata.
Example output snippet (conceptual):
{
"phones": [
{
"phoneId": "12",
"number": "905301234567",
"status": "connected"
},
{
"phoneId": "13",
"number": "905301234568",
"status": "disconnected"
}
]
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Maytapi WhatsApp API authentication.
- The node uses the Maytapi REST API base URL
https://api.maytapi.com/api. - Proper configuration of the Maytapi API credentials in n8n is necessary.
- No additional environment variables are needed.
Troubleshooting
Error: "Phone ID is required."
This error occurs if an operation (other than Account resource) requires a Phone ID but none is provided either in credentials or via the custom Phone ID property. For the Account resource operations like List Phones, this should not occur.API request failures or timeouts:
Ensure the API key credential is valid and has proper permissions. Check network connectivity and Maytapi service status.Invalid JSON errors (not applicable for List Phones):
Some operations require JSON input; ensure JSON fields are correctly formatted.Unsupported operation error:
If you select an operation not supported by the resource, the node will throw an error indicating unsupported operation.