# answerWidgetQuery

> Part of the [Telegram Bot API](/bots/api.md). Canonical location: [answerWidgetQuery](/bots/api#answerwidgetquery).

Use this method to send an answer to a query from a widget. The query must be answered within 15 seconds. The answer is received only by the widget that sent the query and doesn't change data of the widget; use [editMessageWidgetData](/bots/api/methods/editmessagewidgetdata.md) or [editSharedWidgetData](/bots/api/methods/editsharedwidgetdata.md) to change it. On success, *True* is returned.

|Parameter|Type|Required|Description|
|-----------|
|widget_query_id|String|Yes|Unique identifier for the query to be answered|
|data|String|Optional|Data to be returned to the widget, 0-1024 bytes|
