BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Close" operation of the "Bot" resource in this node allows users to close the bot instance on the Bale Messenger platform. This is useful when you want to shut down the bot's connection to the cloud Bot API server, for example, before moving the bot from one local server to another or performing maintenance. Closing the bot ensures that the bot instance is properly terminated and can be restarted cleanly elsewhere.

Practical scenarios include:

  • Migrating the bot service to a different server or environment.
  • Temporarily disabling the bot without deleting it.
  • Ensuring no active sessions remain before redeploying or updating the bot.

Properties

Name Meaning
(No specific input properties unique to "Close") The "Close" operation does not require additional input properties beyond standard node parameters such as credentials.

Note: The "Close" operation uses the API token credential to authenticate the request but does not require any other user inputs.

Output

The output JSON contains a single field indicating the result of the close operation:

  • closed: A boolean or status object indicating whether the bot instance was successfully closed.

Example output JSON:

{
  "closed": true
}

There is no binary data output for this operation.

Dependencies

  • Requires an API authentication token credential for Bale Messenger.
  • Uses the Bale Messenger Bot API endpoint at https://tapi.bale.ai/bot.
  • Relies on the official Node Telegram Bot API client configured with the Bale Messenger base URL.

Troubleshooting

  • Common issues:

    • Invalid or expired API token: The close operation will fail if the provided API token is invalid or revoked.
    • Network connectivity problems: Failure to reach the Bale Messenger API endpoint will cause errors.
    • Attempting to close an already closed or non-existent bot instance may return an error or false status.
  • Error messages:

    • Errors returned by the API will typically include HTTP response details. Check the error message for clues about authentication or request format issues.
    • If the node throws an error related to credentials, verify that the API token is correctly configured in n8n.
  • Resolution tips:

    • Ensure the API token credential is valid and has sufficient permissions.
    • Verify network access to the Bale Messenger API endpoint.
    • Retry the operation after confirming the bot instance status.

Links and References


This summary focuses exclusively on the "Close" operation of the "Bot" resource as requested.

Discussion