telegram api method · layer 229 · #10ea6184

messages.sendVote

usable by users

Vote in a poll

definition

messages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector<bytes> = Updates;

parameters

nametypedescription
peerInputPeerThe chat where the poll was sent
msg_idintThe message ID of the poll
optionsVector<bytes>The options that were chosen

returns

Updates

errors (13)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis 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.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400MESSAGE_POLL_CLOSEDPoll closed.
400MSG_ID_INVALIDInvalid message ID provided.
400OPTION_INVALIDInvalid option selected.
400OPTIONS_TOO_MUCHToo many options provided.
400PEER_ID_INVALIDThe provided peer id is invalid.
400REVOTE_NOT_ALLOWEDYou cannot change your vote.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
406POLL_COUNTRY_RESTRICTEDUsers from the current user's country cannot vote in this country-restricted poll ».
406POLL_MEMBER_RESTRICTEDOnly channel subscribers can vote in this poll.

history

present in layers 91–229

idlayers
#10ea618491–229