Skip to main content

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

NameTypeRequiredDescription
BotInputUserClassyesThe bot that owns the mini app that requested the download
FileNamestringyesThe filename from the web_app_request_file_download event »
URLstringyesThe url from the web_app_request_file_download event »

Returns

bool

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References