Skip to main content

bots.getPreviewInfo

Bot owners only, fetch main mini app preview information, see here » for more info. Note: technically non-owners may also invoke this method, but it will always behave exactly as bots.getPreviewMedias, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use bots.getPreviewMedias if you're not the owner of the bot.

func (c *Client) BotsGetPreviewInfo(ctx context.Context, request *BotsGetPreviewInfoRequest) (*BotsPreviewInfo, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.BotsGetPreviewInfo(ctx, &tg.BotsGetPreviewInfoRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *BotsPreviewInfo
return nil
})

Parameters

NameTypeRequiredDescription
BotInputUserClassyesThe bot that owns the Main Mini App.
LangCodestringyesFetch previews for the specified ISO 639-1 language code.

Returns

*BotsPreviewInfo

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References