Telegram APIMessages
messages.getSponsoredMessages
Get a list of sponsored messages for a peer, see here » for more info.
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 a list of sponsored messages for a peer, see here » for more info.
Response Body
application/json
application/json
curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/messages.getSponsoredMessages" \ -H "Content-Type: application/json" \ -d '{ "params": { "peer": { "_": "inputPeerEmpty" } } }'{ "result": { "_": "messages.sponsoredMessages", "postsBetween": 0, "startDelay": 0, "betweenDelay": 0, "messages": [ { "_": "sponsoredMessage", "recommended": true, "canReport": true, "randomId": "string", "url": "string", "title": "string", "message": "string", "entities": [ { "_": "messageEntityUnknown", "offset": 0, "length": 0 } ], "photo": { "_": "photoEmpty", "id": "string" }, "media": { "_": "messageMediaEmpty" }, "color": { "_": "peerColor", "color": 0, "backgroundEmojiId": "string" }, "buttonText": "string", "sponsorInfo": "string", "additionalInfo": "string", "minDisplayDuration": 0, "maxDisplayDuration": 0 } ], "chats": [ { "_": "chatEmpty", "id": 0 } ], "users": [ { "_": "userEmpty", "id": 0 } ] }}