CRMchat APIBeta
Telegram APIBots

bots.getPreviewInfo

POST
/workspaces/{workspaceId}/telegram-accounts/{accountId}/call/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.RawGetPreviewMediasRequest, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use bots.RawGetPreviewMediasRequest if you're not the owner of the bot.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

workspaceId*string

Workspace ID

accountId*string

Telegram account ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

params*

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.RawGetPreviewMediasRequest, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use bots.RawGetPreviewMediasRequest if you're not the owner of the bot.

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/bots.getPreviewInfo" \  -H "Content-Type: application/json" \  -d '{    "params": {      "bot": {        "_": "inputUserEmpty"      },      "langCode": "string"    }  }'
{  "result": {    "_": "bots.previewInfo",    "media": [      {        "_": "botPreviewMedia",        "date": 0,        "media": {          "_": "messageMediaEmpty"        }      }    ],    "langCodes": [      "string"    ]  }}