Layer 220
MessagesGetPollVotes
Get poll results for non-anonymous polls
method
Users
messages.getPollVotes#b86e380e flags:# peer:InputPeer id:int option:flags.0?bytes offset:flags.1?string limit:int = messages.VotesList;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Peer | InputPeer | Chat where the poll was sent |
| Id | int | Message ID |
| Option | flags.0?bytes | Get only results for the specified poll option |
| Offset | flags.1?string | Offset for results, taken from the next_offset field of messages. votes List, initially an empty string. Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in messages. votes List if it is empty, to avoid an infinite loop. |
| Limit | int | Number of results to return |
Returns
messages.VotesListPossible Errors
| Code | Type | Description |
|---|---|---|
| 403 | BROADCAST_FORBIDDEN | Channel poll voters and reactions cannot be fetched to prevent deanonymization. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 403 | POLL_VOTE_REQUIRED | Cast a vote in the poll before calling this method. |
Gogram Example
// MessagesGetPollVotes - using Params struct result, err := client.MessagesGetPollVotes(&tg.MessagesGetPollVotesParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, Id: 0, Limit: 0, // Optional fields: // Option: []byte{}, // Offset: "...", }) if err != nil { // handle error } // result is *tg.MessagesVotesList