CRMchat APIBeta
Telegram APIChannels

channels.searchPosts

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

Globally search for posts from public channels » (including those we aren't a member of) containing either a specific hashtag, or a full text query. Exactly one of query and hashtag must be set.

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*

Globally search for posts from public channels » (including those we aren't a member of) containing either a specific hashtag, or a full text query. Exactly one of query and hashtag must be set.

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/channels.searchPosts" \  -H "Content-Type: application/json" \  -d '{    "params": {      "offsetRate": 0,      "offsetPeer": {        "_": "inputPeerEmpty"      },      "offsetId": 0,      "limit": 0    }  }'
{  "result": {    "_": "messages.messages",    "messages": [      {        "_": "messageEmpty",        "id": 0,        "peerId": {          "_": "peerUser",          "userId": 0        }      }    ],    "topics": [      {        "_": "forumTopicDeleted",        "id": 0      }    ],    "chats": [      {        "_": "chatEmpty",        "id": 0      }    ],    "users": [      {        "_": "userEmpty",        "id": 0      }    ]  }}