WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

WhatsApp session → Reset session

AI-generated

Overview

The "Reset session" operation for the WhatsApp session resource allows users to reset a specific WhatsApp device session managed by the WaliChat API. This operation is useful when you want to clear or refresh the session state of a WhatsApp number, for example:

  • Deleting all stored chats, messages, and contacts data from the session.
  • Clearing any queued messages that have not yet been sent.
  • Waiting for the device to become available again after resetting.

Practical scenarios include troubleshooting connection issues with a WhatsApp device, clearing stale data to free up resources, or preparing a device for a fresh start without residual session data.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) whose session you want to reset. This is selected from available devices.
Options A collection of optional flags to customize the reset behavior:
- Delete All Data Whether to delete all stored chats, messages, and contacts data associated with the device session.
- Wait For Session Whether to wait for the device to be available after reset, which may delay the response up to 2 minutes.
- Empty Queue Whether to delete all queued messages waiting to be sent on the current device.

Output

The node outputs JSON data representing the result of the reset session operation. The exact structure depends on the underlying API response but generally includes confirmation of the reset action and status information about the device session.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the WaliChat WhatsApp API via an API key credential.
  • The node relies on dynamically loaded device options to select the WhatsApp number.
  • No additional external dependencies are indicated beyond the configured API access.

Troubleshooting

  • Common Issues:

    • Selecting an invalid or offline WhatsApp number may cause the reset operation to fail.
    • If "Wait For Session" is enabled, the node may take up to 2 minutes to respond; users should be aware of this potential delay.
    • Insufficient permissions or expired API keys can lead to authentication errors.
  • Error Messages:

    • Errors related to device unavailability or invalid device ID typically indicate the WhatsApp number is not registered or currently disconnected.
    • Authentication errors suggest checking the API key credential configuration.
    • Timeout errors may occur if the device does not become available within the expected timeframe when "Wait For Session" is true.

Links and References

Discussion