UserShared

class telegram.UserShared(request_id, user_id, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

This object contains information about the user whose identifier was shared with the bot using a telegram.KeyboardButtonRequestUser button.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their request_id and user_id are equal.

New in version 20.1.

Parameters:
  • request_id (int) – Identifier of the request.

  • user_id (int) – Identifier of the shared user. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

request_id[source]

Identifier of the request.

Type:

int

user_id[source]

Identifier of the shared user. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

Type:

int