Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# PersonalDetails

class telegram.PersonalDetails(first_name, last_name, birth_date, gender, country_code, residence_country_code, first_name_native=None, last_name_native=None, middle_name=None, middle_name_native=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents personal details.

  Parameters:

    - first_name (`str`) – First Name.

    - middle_name (`str`) – Optional. First Name.

    - last_name (`str`) – Last Name.

    - birth_date (`str`) – Date of birth in DD.MM.YYYY format.

    - gender (`str`) – Gender, male or female.

    - country_code (`str`) – Citizenship (ISO 3166-1 alpha-2 country code).

    - residence_country_code (`str`) – Country of residence (ISO 3166-1 alpha-2 country code).

    - first_name_native (`str`) – First Name in the language of the user’s country of residence.

    - middle_name_native (`str`) – Optional. Middle Name in the language of the user’s country of residence.

    - last_name_native (`str`) – Last Name in the language of the user’s country of residence.

  first_name

    First Name.

    Type:

      `str`

  middle_name

    Optional. First Name.

    Type:

      `str`

  last_name

    Last Name.

    Type:

      `str`

  birth_date

    Date of birth in DD.MM.YYYY format.

    Type:

      `str`

  gender

    Gender, male or female.

    Type:

      `str`

  country_code

    Citizenship (ISO 3166-1 alpha-2 country code).

    Type:

      `str`

  residence_country_code

    Country of residence (ISO 3166-1 alpha-2 country code).

    Type:

      `str`

  first_name_native

    First Name in the language of the user’s country of residence.

    Type:

      `str`

  middle_name_native

    Optional. Middle Name in the language of the user’s country of residence.

    Type:

      `str`

  last_name_native

    Last Name in the language of the user’s country of residence.

    Type:

      `str`

  Available In

  `telegram.EncryptedPassportElement.data`