Actions24
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node operation allows answering a callback query sent from an inline keyboard in Telegram. It is useful for bots that interact with users via inline keyboards, enabling them to send responses to user actions on those keyboards. For example, when a user presses a button on an inline keyboard, this node can send a notification or alert back to the user, optionally including a URL or text message.
Use Case Examples
- A Telegram bot receives a callback query when a user presses an inline keyboard button. The node answers the query by sending a notification text to the user.
- A bot sends an alert instead of a notification to the user upon receiving a callback query, using the 'Show Alert' option.
- The node can also specify a URL to be opened by the user's client as part of the callback query answer.
Properties
| Name | Meaning |
|---|---|
| Query ID | Unique identifier for the callback query to be answered, required to identify which query is being responded to. |
| Additional Fields | Optional parameters to customize the callback query answer, including cache time, whether to show an alert instead of a notification, notification text, and a URL to open. |
Output
JSON
json- The JSON response from the Telegram API after answering the callback query, including success status and any returned data.
Dependencies
- Requires Telegram API credentials (API key) to authenticate requests to Telegram.
Troubleshooting
- Ensure the 'Query ID' is correctly provided and corresponds to an active callback query; otherwise, the API call will fail.
- If using the 'Show Alert' option, the text must be appropriate and within the 0-200 character limit to avoid errors.
- Network or authentication issues with the Telegram API can cause failures; verify API credentials and connectivity.
Links
- Telegram Bot API - answerCallbackQuery - Official Telegram API documentation for answering callback queries.