CRMchat APIBeta
Telegram APIChannels

channels.getSendAs

POST
/workspaces/{workspaceId}/telegram-accounts/{accountId}/call/channels.getSendAs

Obtains a list of peers that can be displayed as the sender in a specific context. With for_live_stories, returns peers that may author live story in-call messages ».

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*

Obtains a list of peers that can be displayed as the sender in a specific context. With for_live_stories, returns peers that may author live story in-call messages ».

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/channels.getSendAs" \  -H "Content-Type: application/json" \  -d '{    "params": {      "peer": {        "_": "inputPeerEmpty"      }    }  }'
{  "result": {    "_": "channels.sendAsPeers",    "peers": [      {        "_": "sendAsPeer",        "premiumRequired": true,        "peer": {          "_": "peerUser",          "userId": 0        }      }    ],    "chats": [      {        "_": "chatEmpty",        "id": 0      }    ],    "users": [      {        "_": "userEmpty",        "id": 0      }    ]  }}