# messages.getPreparedInlineMessage

Obtain a [prepared inline message](/api/bots/inline.md#21-using-a-prepared-inline-message) generated by a [mini app](/api/bots/webapps.md): invoked when handling [web\_app\_send\_prepared\_message events](/api/web-events.md#web-app-send-prepared-message)

```tl
messages.preparedInlineMessage#ff57708d query_id:long result:BotInlineResult peer_types:Vector<InlineQueryPeerType> cache_time:int users:Vector<User> = messages.PreparedInlineMessage;
---functions---
messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
```

### Parameters

| Name | Type | Description |
| --- | :---: | --- |
| **bot** | [InputUser](/type/InputUser.md) | The bot that owns the mini app that emitted the [web\_app\_send\_prepared\_message event](/api/web-events.md#web-app-send-prepared-message) |
| **id** | [string](/type/string.md) | The `id` from the [web\_app\_send\_prepared\_message event](/api/web-events.md#web-app-send-prepared-message) |

### Result
[messages.PreparedInlineMessage](/type/messages.PreparedInlineMessage.md)

### Only users can use this method

### Possible errors

| Code | Type | Description |
| --- | --- | --- |
| 400 | ID\_EXPIRED | The passed prepared inline message ID has expired. |
| 400 | ID\_INVALID | The passed ID is invalid. |

### Related pages

#### [Web events](/api/web-events.md)
How telegram apps interact with webpages

#### [Inline queries](/api/bots/inline.md)
Users can interact with your bot via inline queries, straight from the text input field in any chat.

#### [Mini Apps on Telegram](/api/bots/webapps.md)
Bots can offer users interactive HTML5 web apps to completely replace any website.