Skip to content

addContact

Function · TDLib 1.8.67 · d1085f9c

Adds a user to the contact list or edits an existing contact by their user identifier

addContact(
  user_id: int53,
  contact: ImportedContact,
  share_phone_number: Bool
) → Ok

user_id

int53

Identifier of the user

contact

ImportedContact

The contact to add or edit; phone number may be empty and needs to be specified only if known

share_phone_number

Bool

Pass true to share the current user's phone number with the new contact. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number