mtproto-core icon indicating copy to clipboard operation
mtproto-core copied to clipboard

users.getUsers returns empty array

Open qunaxis opened this issue 3 years ago • 1 comments

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?

qunaxis avatar May 31 '21 18:05 qunaxis

Something wrong w/ user_id, access_hash. On my user this code work correctly. U can try it on your user.

exilibriss avatar Sep 13 '21 04:09 exilibriss