Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

users.getFullUser behaves differently from different login #286

Open
bonkor opened this issue Aug 21, 2023 · 0 comments
Open

users.getFullUser behaves differently from different login #286

bonkor opened this issue Aug 21, 2023 · 0 comments

Comments

@bonkor
Copy link

bonkor commented Aug 21, 2023

In script

const api = require('./api.js');
const login = require('./login.js');

(async () => {
  const res = await login();

  try {
    const info = await api.call('users.getFullUser', {
      id: {
        _: 'inputUser',
        user_id: '4*****1',
      },
    });
    console.log(info.users[0]);
  } catch (e) {
    console.log('getFullUser', e);
  }

})();

where api.js is from https://mtproto-core.js.org/docs/setup-handle-errors and login.js is from https://mtproto-core.js.org/docs/user-authorization
users.getFullUser works good.
If I change phone, code in login.js (and api_id, api_hash in api.js) to my second phone,code,id,hash - users.getFullUser rise error:
{
_: 'mt_rpc_error',
error_code: 400,
error_message: 'USER_ID_INVALID'
}
How to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant