transfer_gift()

Client.transfer_gift()

Transfer star gift to another user.

Usable by Users Bots
Parameters:
  • message_id (int) – Unique message identifier of star gift.

  • to_chat_id (int | str) – Unique identifier (int) or username (str) of the target chat you want to transfer the star gift to. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).

Returns:

bool – On success, True is returned.

Example

# Transfer gift to another user
app.transfer_gift(message_id=123, to_chat_id=123)