Actions24
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node operation answers an inline query callback in Telegram. It is used to respond to inline queries sent by users to a Telegram bot, providing a JSON-serialized array of results that the bot can display as inline query results. This is useful for bots that offer inline search or content suggestions directly within the Telegram chat interface.
Use Case Examples
- A bot that provides inline search for GIFs can use this operation to send back a list of GIF results matching the user's query.
- A bot that offers inline product recommendations can answer inline queries with a list of product cards for users to select from.
Properties
| Name | Meaning |
|---|---|
| Query ID | Unique identifier for the answered inline query, used to specify which query to respond to. |
| Results | A JSON-serialized array of results for the inline query, representing the content to be shown to the user. |
| Additional Fields | Optional parameters to customize the response, such as cache time, whether to show an alert instead of a notification, notification text, and a URL to open. |
Output
JSON
result- The response from Telegram API after answering the inline query, including status and any returned data.
Dependencies
- Telegram API credentials required for authentication.
Troubleshooting
- Ensure the Query ID is correct and corresponds to an active inline query; otherwise, the API call will fail.
- The Results field must be a valid JSON-serialized array; invalid JSON will cause errors.
- If using additional fields, ensure their values conform to Telegram API specifications to avoid rejection.
Links
- Telegram Bot API - answerInlineQuery - Official Telegram API documentation for answering inline queries.