Actions13
- Chatwoot Integration Actions
- Instance Actions
- Message Actions
- Parser Actions
- Webhook Actions
Overview
The node "MegaAPI" integrates with the MegaAPI WhatsApp service, enabling users to manage WhatsApp instances and send or receive messages programmatically. Specifically, the Instance - Get Pairing Code operation allows retrieving a pairing code for connecting a WhatsApp instance without using a QR code. This is useful in scenarios where QR code scanning is inconvenient or impossible, such as automated deployments or headless environments.
Practical examples include:
- Automating WhatsApp instance setup by obtaining a pairing code that can be shared or used in other systems.
- Managing multiple WhatsApp instances remotely without manual QR code scanning.
- Integrating WhatsApp connectivity into backend workflows where user interaction is limited.
Properties
| Name | Meaning |
|---|---|
| Phone Number | WhatsApp phone number including country code but without the "+" prefix (e.g., 5511999999999). This identifies the WhatsApp instance for which the pairing code will be retrieved. |
Output
The output JSON structure contains the response from the MegaAPI service related to the requested pairing code. While the exact fields are not detailed in the source, typically it would include:
- The pairing code string needed to connect the WhatsApp instance.
- Possibly metadata about the instance or status of the request.
No binary data output is indicated for this operation.
Dependencies
- Requires access to the MegaAPI WhatsApp service API.
- The node expects proper authentication credentials configured in n8n to communicate with MegaAPI (e.g., an API key or token).
- No explicit environment variables or additional external dependencies are mentioned in the source.
Troubleshooting
Common issues:
- Invalid or incorrectly formatted phone number (must include country code, no "+").
- Network or authentication errors when connecting to MegaAPI.
- Using the wrong resource or operation name may cause errors.
Error messages:
"Unknown instance operation: getPairingCode": Indicates the operation name was misspelled or not supported.- Errors related to API communication usually indicate credential misconfiguration or network problems.
Resolutions:
- Verify the phone number format matches the required pattern.
- Ensure valid API credentials are set up in n8n.
- Confirm the MegaAPI service is reachable and operational.
Links and References
- MegaAPI WhatsApp Service Documentation (example placeholder, replace with actual URL if available)
- n8n documentation on Creating Custom Nodes
- WhatsApp Business API official docs for understanding pairing concepts: https://developers.facebook.com/docs/whatsapp/api/pairing-code
Note: This summary is based solely on static analysis of the provided source code and property definitions.