Open bonkor opened 1 year ago
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, apihash 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?
In script
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, apihash 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?