Skip to content

fetchUserContacts

This method provides a list of contact objects identifying all entities who previously granted authorization to a specified entity to send them telegram messages. Each contact contains the contact's ETH address as well as the ETH address for the protectedData containing their telegram chat ID.

Usage

ts

const 
contactsList
= await
web3telegram
.
fetchUserContacts
({
userAddress
: '0xF048eF3d7E3B33A465E0599E641BB29421f7Df92',
});

Parameters

ts
import { type 
FetchUserContactsParams
} from '@iexec/web3telegram';

userAddress

Address

The entity for which you wish to obtain the list of contacts.

ts

const 
contactsList
= await
web3telegram
.
fetchUserContacts
({
userAddress
: '0xF048eF3d7E3B33A465E0599E641BB29421f7Df92',
});

Return value

The result object contains a list of contact objects. Each contact represents one user who previously granted authorization for the user identified with userAddress to send them messages.

ts
import { type 
Contact
} from '@iexec/web3telegram';