> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# New Callback Query

- Component: `appmixer.telegram.core.NewCallbackQuery`
- Kind: Trigger
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.telegram 1.1.2](https://connectors.appmixer.com/connector/appmixer.telegram/1.1.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.telegram/1.1.2/component/appmixer.telegram.core.NewCallbackQuery>

Triggers when a user presses an inline-keyboard button attached to one of the bot's messages. Answer it with the Answer Callback Query action, otherwise the button keeps showing a loading indicator. Shares the single per-bot webhook registration with the other Telegram triggers.

## Properties

| Field | Type | Description |
| --- | --- | --- |
| Chat ID (`chatId`) | text | Only emit button presses that happened in this chat. Leave empty to receive all of them. |
| Callback Data (`callbackData`) | text | Only emit presses whose callback data matches this value exactly. Leave empty to receive all. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Callback Query ID (`id`) | string | - |
| From (`from`) | object | - |
| Message (`message`) | object | - |
| Inline Message ID (`inline_message_id`) | string | - |
| Chat Instance (`chat_instance`) | string | - |
| Callback Data (`data`) | string | - |
| Update ID (`update_id`) | integer | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.telegram.core.NewCallbackQuery",
  "label": "New Callback Query",
  "description": "Triggers when a user presses an inline-keyboard button attached to one of the bot's messages. Answer it with the Answer Callback Query action, otherwise the button keeps showing a loading indicator. Shares the single per-bot webhook registration with the other Telegram triggers.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "trigger": true,
  "webhook": true,
  "auth": {
    "service": "appmixer:telegram"
  },
  "quota": {
    "manager": "appmixer:telegram",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "properties": {
    "schema": {
      "type": "object",
      "properties": {
        "chatId": {
          "type": "string"
        },
        "callbackData": {
          "type": "string"
        }
      }
    },
    "inspector": {
      "inputs": {
        "chatId": {
          "type": "text",
          "index": 1,
          "label": "Chat ID",
          "tooltip": "Only emit button presses that happened in this chat. Leave empty to receive all of them."
        },
        "callbackData": {
          "type": "text",
          "index": 2,
          "label": "Callback Data",
          "tooltip": "Only emit presses whose callback data matches this value exactly. Leave empty to receive all."
        }
      }
    }
  },
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "title": "Callback Query ID",
            "example": "4382bfdwdsb323b2d9"
          },
          "from": {
            "type": "object",
            "title": "From",
            "required": [
              "id",
              "is_bot",
              "first_name"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "title": "From.ID",
                "example": 6412345678
              },
              "is_bot": {
                "type": "boolean",
                "title": "From.Is Bot",
                "example": false
              },
              "first_name": {
                "type": "string",
                "title": "From.First Name",
                "example": "Jana"
              },
              "last_name": {
                "type": "string",
                "title": "From.Last Name",
                "example": "Novakova"
              },
              "username": {
                "type": "string",
                "title": "From.Username",
                "example": "jana_novakova"
              },
              "language_code": {
                "type": "string",
                "title": "From.Language Code",
                "example": "cs"
              }
            },
            "example": {
              "id": 6412345678,
              "is_bot": false,
              "first_name": "Jana",
              "username": "jana_novakova"
            }
          },
          "message": {
            "type": "object",
            "title": "Message",
            "properties": {
              "message_id": {
                "type": "integer",
                "title": "Message.ID"
              },
              "chat": {
                "type": "object",
                "title": "Message.Chat",
                "required": [
                  "id",
                  "type"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "title": "Message.Chat.ID",
                    "example": -1002345678901
                  },
                  "type": {
                    "type": "string",
                    "title": "Message.Chat.Type",
                    "example": "supergroup"
                  },
                  "title": {
                    "type": "string",
                    "title": "Message.Chat.Title",
                    "example": "Product Team"
                  },
                  "username": {
                    "type": "string",
                    "title": "Message.Chat.Username",
                    "example": "product_team"
                  },
                  "first_name": {
                    "type": "string",
                    "title": "Message.Chat.First Name",
                    "example": "Jana"
                  },
                  "last_name": {
                    "type": "string",
                    "title": "Message.Chat.Last Name",
                    "example": "Novakova"
                  },
                  "is_forum": {
                    "type": "boolean",
                    "title": "Message.Chat.Is Forum",
                    "example": false
                  },
                  "all_members_are_administrators": {
                    "type": "boolean",
                    "title": "Message.Chat.All Members Are Administrators",
                    "example": false
                  }
                },
                "example": {
                  "id": -1002345678901,
                  "type": "supergroup",
                  "title": "Product Team"
                }
              },
              "date": {
                "type": "integer",
                "title": "Message.Date (Unix Time)",
                "example": 1756200000
              },
              "text": {
                "type": "string",
                "title": "Message.Text"
              }
            },
            "example": {
              "message_id": 1042,
              "chat": {
                "id": -1002345678901,
                "type": "supergroup",
                "title": "Product Team"
              },
              "text": "Approve this request?"
            },
            "required": [
              "message_id",
              "date",
              "chat"
            ]
          },
          "inline_message_id": {
            "type": "string",
            "title": "Inline Message ID",
            "example": "AAAAAFmsrLE"
          },
          "chat_instance": {
            "type": "string",
            "title": "Chat Instance",
            "example": "-1833085621013721219"
          },
          "data": {
            "type": "string",
            "title": "Callback Data",
            "example": "approve:1042"
          },
          "update_id": {
            "type": "integer",
            "title": "Update ID",
            "example": 987654322
          }
        },
        "required": [
          "id",
          "from",
          "chat_instance",
          "update_id"
        ]
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
