Skip to content

importContacts

Sahri Riza Umami edited this page Mar 15, 2017 · 4 revisions

Adds new contacts/edits existing contacts, contacts user identifiers are ignored.

importContacts(phone_number, first_name, last_name, user_id)

Returns list of corresponding users in the same order as input contacts.
If contact doesn't registered in Telegram, user with id == 0 will be returned.
phone_number is prefixed with country code without plus (+) sign.

Option Description
contacts List of contacts to import/edit.

Example

  • Add "Si Anu" to contacts. The phone number is prefixed with country code wtihout plus sign, in this example +62 is the country code for Indonesia.

    importContacts(62123456789090, 'Si', 'Anu', 133780085)

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally