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

# InputContactMessageContent

class telegram.InputContactMessageContent(phone_number, first_name, last_name=None, vcard=None, *, api_kwargs=None)

  Bases: `telegram.InputMessageContent`

  Represents the content of a contact message to be sent as the result of an inline query.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `phone_number` is equal.

  Parameters:

    - phone_number (`str`) – Contact’s phone number.

    - first_name (`str`) – Contact’s first name.

    - last_name (`str`, optional) – Contact’s last name.

    - vcard (`str`, optional) – Additional data about the contact in the form of a vCard, 0-`2048` bytes.

  phone_number

    Contact’s phone number.

    Type:

      `str`

  first_name

    Contact’s first name.

    Type:

      `str`

  last_name

    Optional. Contact’s last name.

    Type:

      `str`

  vcard

    Optional. Additional data about the contact in the form of a vCard, 0-`2048` bytes.

    Type:

      `str`

  Available In

  - `telegram.InlineQueryResultArticle.input_message_content`

  - `telegram.InlineQueryResultAudio.input_message_content`

  - `telegram.InlineQueryResultCachedAudio.input_message_content`

  - `telegram.InlineQueryResultCachedDocument.input_message_content`

  - `telegram.InlineQueryResultCachedGif.input_message_content`

  - `telegram.InlineQueryResultCachedMpeg4Gif.input_message_content`

  - `telegram.InlineQueryResultCachedPhoto.input_message_content`

  - `telegram.InlineQueryResultCachedSticker.input_message_content`

  - `telegram.InlineQueryResultCachedVideo.input_message_content`

  - `telegram.InlineQueryResultCachedVoice.input_message_content`

  - `telegram.InlineQueryResultContact.input_message_content`

  - `telegram.InlineQueryResultDocument.input_message_content`

  - `telegram.InlineQueryResultGif.input_message_content`

  - `telegram.InlineQueryResultLocation.input_message_content`

  - `telegram.InlineQueryResultMpeg4Gif.input_message_content`

  - `telegram.InlineQueryResultPhoto.input_message_content`

  - `telegram.InlineQueryResultVenue.input_message_content`

  - `telegram.InlineQueryResultVideo.input_message_content`

  - `telegram.InlineQueryResultVoice.input_message_content`