Link Search Menu Expand Document

Method: contacts.getContacts

Back to methods index

Returns the current user’s contact list.


hashArray of longIf there already is a full contact list on the client, a hash of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, (contacts.contactsNotModified) will be returned.Optional

Return type: contacts.Contacts

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$contacts_Contacts = $MadelineProto->contacts->getContacts(hash: [$long, $long], );