Actions148
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
Overview
This node interacts with the SparkBot WhatsApp API to manage WhatsApp sessions, specifically allowing users to request an authentication code for a WhatsApp number. This operation is useful when setting up or re-authenticating a WhatsApp device session, such as when connecting a new phone number or forcing a new login session.
Typical use cases include:
- Initiating the WhatsApp login process by requesting an authentication code sent to a specified phone number.
- Forcing a new authentication code request by destroying any existing session tied to the WhatsApp number.
- Managing multiple WhatsApp devices/numbers within an automation workflow.
For example, you might use this node to programmatically trigger sending an auth code to a user's phone during onboarding or to reset a session if connectivity issues occur.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number/device to request the auth code for. Loaded dynamically from available devices. |
| Force New Authentication | Boolean flag indicating whether to destroy any existing session and force a new authentication code request. |
| Phone Number | The phone number in E.164 format (e.g., +16001234560) to which the authorization code will be sent. Required if the device was never connected before. |
Output
The node outputs JSON data representing the result of the authentication code request operation. This typically includes status information about the request, such as success confirmation or error details.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the SparkBot WhatsApp API via an API key credential configured in n8n.
- The node depends on dynamic loading of available WhatsApp devices/numbers to populate the "WhatsApp Number" property.
- Proper network access to the SparkBot service endpoint is necessary.
Troubleshooting
Common Issues:
- Requesting an auth code for a device that does not exist or is not registered may fail.
- Providing an invalid or improperly formatted phone number (not in E.164 format) can cause errors.
- Attempting to request a new auth code without setting the "Force New Authentication" flag when a session already exists may not behave as expected.
Error Messages:
- Errors related to missing or invalid phone numbers usually indicate the need to provide a valid E.164 formatted number.
- Authentication failures may require checking the API key credential configuration.
- Network or API errors should be resolved by verifying connectivity and SparkBot service status.
Links and References
- E.164 Phone Number Formatting
- SparkBot WhatsApp API documentation (refer to your service provider's official docs for detailed API usage)