BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

This node operation allows you to answer inline queries sent from an inline bot in Bale Messenger. Inline queries occur when a user types a query in the chat input field that triggers your bot to provide a list of results directly within the chat interface. This node sends back those results to Bale Messenger, enabling interactive and dynamic content delivery.

Common scenarios where this node is useful include:

  • Providing search results or suggestions based on user input.
  • Offering quick replies or media options inline without sending separate messages.
  • Creating interactive bots that respond instantly with rich content like images, articles, or custom buttons.

For example, if your bot supports searching for GIFs, this node can send back a list of GIFs matching the user's query, which the user can then select and send in the chat.

Properties

Name Meaning
Query ID Unique identifier for the answered inline query. This identifies which inline query the bot is responding to.
Results A JSON-serialized array of results for the inline query. These results define what content (e.g., articles, photos, videos) will be shown as answers to the inline query.
Additional Fields Optional extra parameters:
• Cache Time: Maximum time in seconds the result may be cached client-side.
• Show Alert: Whether to show an alert instead of a notification.
• Text: Notification text (0-200 chars).
• URL: URL to open on user’s client.

Output

The output JSON contains a single field indicating whether the request to answer the inline query was successful. It typically looks like:

{
  "successful": true
}

If there is an error, the output includes fields such as errorMessage and errorDetails describing the failure.

No binary data is output by 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.
  • The node depends on the official Telegram Bot API client adapted for Bale Messenger.
  • No additional environment variables are required beyond the API token credential.

Troubleshooting

  • Invalid JSON in Results: The Results property must be a valid JSON string representing an array. If parsing fails, the node throws an error. Ensure the JSON is correctly formatted.
  • API Errors: If the Bale Messenger API returns an error (e.g., invalid query ID, malformed results), the node outputs an error message. Check the API token validity and the correctness of parameters.
  • Empty or Missing Query ID: The Query ID is mandatory. Omitting it causes the node to fail.
  • Network Issues: Connectivity problems to the Bale Messenger API endpoint will cause request failures. Verify network access and API availability.

Links and References

Discussion