mtproto-core
mtproto-core copied to clipboard
users.getUsers returns empty array
Hello!
I recieving updates by api.mtproto.updates.on('updates', (updateInfo) => {})
method. So, when i tried to get mentioned users info (for getting username — @qunaxis, for example) by users.getUsers
method its returned an empty array.
const params = {
id: [
{
_: 'inputUser',
user_id: 341548308, // from updateInfo.users
access_hash: '17478753989461824770' // from updateInfo.users
}
]
}
const users = await api.call('users.getUsers', params);
console.log(users)
This produces an empty []
array in my console.
This is my first experience with Telegram API through mtproto(-n). What am I doing wrong?
Something wrong w/ user_id, access_hash. On my user this code work correctly. U can try it on your user.