telegram.link icon indicating copy to clipboard operation
telegram.link copied to clipboard

SendCode callback never called

Open overjt opened this issue 9 years ago • 9 comments

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.

console

there's something I'm doing wrong?

overjt avatar Oct 29 '15 20:10 overjt

I am facing the same issue, "client.sendCode" callback is never called.

rtalwar26 avatar Nov 11 '15 12:11 rtalwar26

Which node.js version are you using?

enricostara avatar Nov 12 '15 04:11 enricostara

v0.12.7

rtalwar26 avatar Nov 12 '15 08:11 rtalwar26

@enricostara v4.2.1

overjt avatar Nov 13 '15 16:11 overjt

Everything works when the connection type "tcp" is changed to http, but HTTP connection does not work in windows.

overjt avatar Nov 21 '15 16:11 overjt

@overjt That didn't solve my issue. I get the code in my telegram, but the callback of sendCode is not being called.

masious avatar Mar 30 '16 00:03 masious

@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.

jyothisjose avatar Jun 27 '16 11:06 jyothisjose