telegram api method · layer 229 · #10ea6184
messages.sendVote
Vote in a poll
definition
messages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector<bytes> = Updates;
parameters
| name | type | description |
|---|---|---|
peer | InputPeer | The chat where the poll was sent |
msg_id | int | The message ID of the poll |
options | Vector<bytes> | The options that were chosen |
returns
errors (13)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | MESSAGE_POLL_CLOSED | Poll closed. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | OPTION_INVALID | Invalid option selected. |
| 400 | OPTIONS_TOO_MUCH | Too many options provided. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | REVOTE_NOT_ALLOWED | You cannot change your vote. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
| 406 | POLL_COUNTRY_RESTRICTED | Users from the current user's country cannot vote in this country-restricted poll ». |
| 406 | POLL_MEMBER_RESTRICTED | Only channel subscribers can vote in this poll. |
history
present in layers 91–229
| id | layers |
|---|---|
| #10ea6184 | 91–229 |