users.getUsers

Returns basic user info according to their identifiers.

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.users.getUsers({
        id: [new Api.InputUser({...})],
        }));
    console.log(result); // prints the result
})();

TL schema

---functions---
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;

Parameters

Result

Vector[User](https://core.telegram.org/type/User)

Possible errors

Can bots use this methd ?

yes

Last updated