Answer the question
In order to leave comments, you need to log in
How to send request through proxy for telegram api(not bot) using nodeJs?
I use this library to connect to the telegram API, but when a request is made to the server, an error pops up that it is impossible to complete the request, etc. because of RComN... So, does anyone know how to bypass this blocking using a proxy and a library (telegram-mtproto)?
The code:
const {MTProto} = require('telegram-mtproto')
const phone = {
num : '+90555555555',
code: '22222'
}
const api = {
layer : 57,
initConnection : 0x69796de9,
api_id : 111111
}
const server = {
dev: true,
}
const client = MTProto(server, api)
async function connect(){
const { phone_code_hash } = await client('auth.sendCode', {
phone_number : phone.num,
sms_type: 5,
api_id : 111111,
api_hash : 'fb050b8fjernf323FDFWS2332'
})
console.log(phone_code_hash)
// const { user } = await client('auth.signIn', {
// phone_number : phone.num,
// phone_code_hash: phone_code_hash,
// phone_code : phone.code
// })
// console.log('signed as ', user);
}
connect();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question