# messages.getPreparedInlineMessage

> Obtain a [prepared inline message](https://core.telegram.org/api/bots/inline#21-using-a-prepared-inline-message) generated by a [mini app](https://core.telegram.org/api/bots/webapps): invoked when handling [web_app_send_prepared_message events](https://core.telegram.org/api/web-events#web-app-send-prepared-message)

[Back to methods index](index.html)



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

### Parameters:

| Name     |    Type       | Description | Required |
|----------|---------------|-------------|----------|
|bot|[Username, chat ID, Update, Message or InputUser](/API_docs/types/InputUser.html) | The bot that owns the mini app that emitted the [web\_app\_send\_prepared\_message event](https://core.telegram.org/api/web-events#web-app-send-prepared-message) | Optional|
|id|[string](/API_docs/types/string.html) | The `id` from the [web\_app\_send\_prepared\_message event](https://core.telegram.org/api/web-events#web-app-send-prepared-message) | Optional|


### Return type: [messages.PreparedInlineMessage](/API_docs/types/messages.PreparedInlineMessage.html)

### Can users use this method: **YES**


### Can bots use this method: **NO**


### Can bots use this method over a business connection with the `businessConnectionId` flag: **NO**


### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):


```php
if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$messages_PreparedInlineMessage = $MadelineProto->messages->getPreparedInlineMessage(bot: $InputUser, id: 'string', );
```
