get_business_account_gifts()

Client.get_business_account_gifts()

Return the gifts received and owned by a managed business account.

Note

Requires the can_view_gifts_and_stars business bot right.

Usable by Users Bots
Parameters:
  • business_connection_id (str) – Unique identifier of business connection on behalf of which to send the request.

  • exclude_unsaved (bool, optional) – Pass True to exclude gifts that aren’t saved to the account’s profile page.

  • exclude_saved (bool, optional) – Pass True to exclude gifts that are saved to the account’s profile page.

  • exclude_unlimited (bool, optional) – Pass True to exclude gifts that can be purchased an unlimited number of times.

  • exclude_limited (bool, optional) – Pass True to exclude gifts that can be purchased a limited number of times.

  • exclude_upgraded (bool, optional) – Pass True to exclude upgraded gifts.

  • sort_by_price (bool, optional) – Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.

  • offset (str, optional) – Offset of the first entry to return as received from the previous request.

  • limit (int, optional) – The maximum number of gifts to be returned.

Returns:

Generator – A generator yielding Gift objects.

Example

async for gift in app.get_business_account_gifts(connection_id):
    print(gift)