messages.sendPaidReaction

Sends one or more paid Telegram Star reactions », transferring Telegram Stars » to a channel's balance.

 Method schema is available as of layer 187. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
peer InputPeer The channel
msg_id int The message to react to
count int The number of stars to send (each will increment the reaction counter by one).
random_id long Unique client message ID required to prevent message resending.
Note: this argument must be composed of a 64-bit integer where the first 32 bits are random, and the remaining 32 bits are equal to the current unixtime, i.e. uint64_t random_id = (time() << 32) | ((uint64_t)random_uint32_t()): this differs from the random_id format of all other methods in the API, which just take 64 random bits.
private flags.0?PaidReactionPrivacy Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy. Not populating this field will use the default reaction privacy, stored on the server and synced to clients using updatePaidReactionPrivacy (see here for more info).

Result

Updates

Possible errors

Code Type Description
400 CHANNEL_INVALID The provided channel is invalid.
400 MESSAGE_ID_INVALID The provided message id is invalid.
400 PEER_ID_INVALID The provided peer id is invalid.
400 RANDOM_ID_EMPTY Random ID empty.
400 RANDOM_ID_EXPIRED  
400 REACTIONS_COUNT_INVALID  
400 SEND_AS_PEER_INVALID You can't send messages as the specified peer.

Only users can use this method

Related pages

Telegram Stars

Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.

updatePaidReactionPrivacy

Contains the current default paid reaction privacy, see here » for more info.

Clients should invoke messages.getPaidReactionPrivacy on startup to fetch the current default reaction privacy because this update is only sent to currently online sessions and cannot be fetched using getDifference on client startup.

Message reactions

Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.