CRMchat APIBeta
Telegram APIChannels

channels.getGroupsForDiscussion

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

Get all groups that can be used as discussion groups. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.RawTogglePreHistoryHiddenRequest, first.

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*

Get all groups that can be used as discussion groups. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.RawTogglePreHistoryHiddenRequest, first.

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/channels.getGroupsForDiscussion" \  -H "Content-Type: application/json" \  -d '{    "params": {}  }'
{  "result": {    "_": "messages.chats",    "chats": [      {        "_": "chatEmpty",        "id": 0      }    ]  }}