CRMchat APIBeta
Telegram APIUpload

upload.getWebFile

POST
/workspaces/{workspaceId}/telegram-accounts/{accountId}/call/upload.getWebFile

Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info. Note: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.

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*

Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info. Note: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/upload.getWebFile" \  -H "Content-Type: application/json" \  -d '{    "params": {      "location": {        "_": "inputWebFileLocation",        "url": "string",        "accessHash": "string"      },      "offset": 0,      "limit": 0    }  }'
{  "result": {    "_": "upload.webFile",    "size": 0,    "mimeType": "string",    "fileType": {      "_": "storage.fileUnknown"    },    "mtime": 0,    "bytes": "string"  }}