contacts.addContact
Add an existing telegram user as contact.
| Name | Type | Required | Description |
|---|---|---|---|
add_phone_privacy_exception | true | No | Allow the other user to see our phone number? |
id | InputUser | Yes | Telegram ID of the other user |
first_name | string | Yes | First name |
last_name | string | Yes | Last name |
phone | string | Yes | User's phone number, may be omitted to simply add the user to the contact list, without a phone number. |
note | TextWithEntities | No | A private note for this contact, only visible to us; see [here »](https://core.telegram.org/api/contacts.md#private-notes-for-contacts) for more info on contact notes. |
Responses
Updates
MTProto RPC
- 400 · CHANNEL_PRIVATE — You haven't joined this channel/supergroup.
- 400 · CONTACT_ID_INVALID — The provided contact ID is invalid.
- 400 · CONTACT_NAME_EMPTY — Contact name empty.
- 400 · MSG_ID_INVALID — Invalid message ID provided.