BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Bot" resource with the "Log Out" operation allows you to log out from the cloud Bot API server of Bale Messenger. This is useful when you want to disconnect your bot from the cloud service, for example before launching or running the bot locally on your own server. Logging out ensures that the bot session on the cloud is terminated properly.

Practical scenarios include:

  • Migrating bot hosting from the cloud to a local environment.
  • Resetting the bot session in case of authentication or connection issues.
  • Ensuring no duplicate bot instances are active simultaneously.

Properties

Name Meaning
Reply Keyboard Adds a custom keyboard with reply options. You can add multiple rows and buttons with text.
Reply Keyboard Remove Options to remove the custom keyboard, including whether to remove it selectively for specific users.

Note: For the "Log Out" operation specifically, no additional input properties are required beyond selecting the operation itself.

Output

The output JSON contains a single field:

  • logged_out: A boolean indicating whether the logout was successful.

Example output JSON:

{
  "logged_out": true
}

No binary data is produced by this operation.

Dependencies

  • Requires an API authentication token credential for Bale Messenger.
  • Uses the official Bale Messenger Bot API endpoint (https://tapi.bale.ai/bot).
  • The node depends on the node-telegram-bot-api library configured to use the Bale Messenger API base URL.
  • No additional environment variables are needed beyond the API token credential.

Troubleshooting

  • Common Issues:

    • Invalid or expired API token may cause logout failure.
    • Network connectivity problems can prevent communication with the Bale Messenger API.
    • Attempting to log out when the bot is not logged in might return an error or false response.
  • Error Messages:

    • Errors from the API will be logged internally but not explicitly shown in the output.
    • If the logout fails, the node may throw an error or return a response indicating failure.
  • Resolution Tips:

    • Verify the API token credential is correct and has proper permissions.
    • Check network access to https://tapi.bale.ai.
    • Ensure the bot is currently logged in before attempting to log out.

Links and References


This summary focuses solely on the "Bot" resource with the "Log Out" operation as requested.

Discussion