BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node interacts with the Bale Messenger API to perform various chat-related actions. Specifically, for the Chat - Unban Chat Member operation, it allows unbanning a previously banned user from a chat group or channel. This is useful in scenarios where a user was banned but later needs to be reinstated to participate again.

Practical examples:

  • Reinstating a user who was mistakenly banned.
  • Allowing a user back into a group after a temporary ban period.
  • Managing chat membership dynamically based on moderation decisions.

Properties

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

Output

The output JSON contains a single field:

  • unbanned: A boolean or status indicator returned by the Bale Messenger API that confirms whether the unban action was successful.

No binary data is output by this operation.

Example output JSON:

{
  "unbanned": true
}

Dependencies

  • Requires an active Bale Messenger API credential (an API token) configured in n8n.
  • Uses the official Bale Messenger Bot API endpoint (https://tapi.bale.ai/bot).
  • Relies on the node-telegram-bot-api library for API interaction.

Troubleshooting

  • Common issues:

    • Invalid or expired API token: Ensure the Bale Messenger API credentials are valid and have not expired.
    • Incorrect Chat ID or User ID: Verify that the provided IDs correspond to existing chat and user entities.
    • Attempting to unban a user who is not banned when Only If Banned is set to true may result in no action or an error depending on API behavior.
  • Error messages:

    • API errors typically include response data with details; check logs for specific error messages.
    • Network or connectivity issues can cause request failures; verify network access to the Bale Messenger API endpoint.

Links and References

Discussion