telegram.link
telegram.link copied to clipboard
SendCode callback never called
Hello. I'm using this code: https://gist.github.com/overjt/ae2ebc85b8308beac40c
data.onPhoneNumber = function(s) {
if (data.user === undefined) {
data.user = {};
}
data.user.phone = s.trim();
//i.close();
console.log('Checking your phone number with Telegram...');
data.client.auth.sendCode(data.user.phone, 5, 'en', function(result) {
console.log("never called");
console.log(result);
});
}
The login code arrives but the function passed as callback is never executed.
there's something I'm doing wrong?
I am facing the same issue, "client.sendCode" callback is never called.
Which node.js version are you using?
v0.12.7
@enricostara v4.2.1
Everything works when the connection type "tcp" is changed to http, but HTTP connection does not work in windows.
@overjt That didn't solve my issue. I get the code in my telegram, but the callback of sendCode
is not being called.
@overjt Does this works? Are you able to get into callback function? If so how did you fix it?
I am also facing the same issue in client.contacts.getContacts("",function(container){ console.log('getContacts'); }) Callback function is not calling. Am I missing something?
Can some one please help me.