BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node interacts with the Bale Messenger API to manage chat members and perform various chat-related actions. Specifically, the "Unban Chat Member" operation allows you to remove a ban on a user in a chat, restoring their ability to participate.

This node is useful in scenarios where chat administrators want to programmatically control membership, such as unbanning users after a temporary suspension or automating moderation workflows.

Example use cases:

  • Automatically unban users after a set timeout.
  • Integrate with external systems to lift bans based on user behavior or appeals.
  • Manage chat member permissions dynamically within larger automation flows.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the unban action will be performed.
UserId The unique identifier of the user to be unbanned from the chat.
Only If Banned Boolean flag indicating whether to perform the unban action only if the user is currently banned.

Note: Other properties listed in the full node are not relevant to this specific operation.

Output

The output JSON contains a single field:

  • unbanned: A boolean indicating whether the unban operation was successful (true) or not (false).

No binary data is produced by this operation.

Example output:

{
  "unbanned": true
}

Dependencies

  • Requires an active Bale Messenger API authentication token configured in the node credentials.
  • Relies on the Bale Messenger API endpoint at https://tapi.bale.ai/bot.
  • No additional environment variables or external services are required beyond the API credential.

Troubleshooting

  • Common issues:

    • Invalid or expired API token may cause authentication failures.
    • Incorrect Chat ID or UserId values can lead to errors or no effect.
    • Attempting to unban a user who is not banned when Only If Banned is set to true might result in no action.
  • Error messages:

    • API errors returned from Bale Messenger will typically include error details; ensure the provided IDs are correct.
    • Network or connectivity issues may cause request failures; verify network access to the Bale API endpoint.
  • Resolution tips:

    • Double-check that the user is actually banned before attempting to unban if using the Only If Banned option.
    • Confirm that the chat and user identifiers are accurate and correspond to existing entities.
    • Ensure the API token has sufficient permissions to manage chat members.

Links and References

Discussion