bots.checkDownloadFileParams
Check if a mini app can request the download of a specific file: called when handling web_app_request_file_download events »
func (c *Client) BotsCheckDownloadFileParams(ctx context.Context, request *BotsCheckDownloadFileParamsRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.BotsCheckDownloadFileParams(ctx, &tg.BotsCheckDownloadFileParamsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Bot | InputUserClass | yes | The bot that owns the mini app that requested the download |
FileName | string | yes | The filename from the web_app_request_file_download event » |
URL | string | yes | The url from the web_app_request_file_download event » |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.checkDownloadFileParams#50077589