Sends a gift to another user or channel chat. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
gift_id |
Identifier of the gift to send |
owner_id |
Identifier of the user or the channel chat that will receive the gift |
text |
Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed. Must be empty if the receiver enabled paid messages |
is_private |
Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them |
pay_for_upgrade |
Pass true to additionally pay for the gift upgrade and allow the receiver to upgrade it for free |