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

[ERROR] telegram-link Client is not yet ready!

Open pavelsr opened this issue 8 years ago • 4 comments

Hi Enrico,

I have similar issue to #8 , but decided to open a new issue too cause issue #8 is closed and you could leave my comment without attention.

My purpose is to know whether the passed phone number was registered in Telegram or no. I have same problem when requesting with your library auth.checkPhone method, which even doesn't requre authorization according API docs.

Here is my script

var data = {} // Hold all global data
data.telegramLink = require('../telegram.link')();

data.app = {
   id: 12345,
     hash: '12345678901234567890',
     version: '1.0.0',
     lang: 'en'
};

data.client = data.telegramLink.createClient(data.app, data.telegramLink.TEST_PRIMARY_DC, function(ex){
  if(!ex) { 
    console.log('Connected to Telegram!');
    data.client.auth.checkPhone('79885851900', function (result) {
      console.log(result);
    }); 
  } 
  else { 
    console.log(ex);
  }
})

I have checked and tested telecommander.js, it works fine. My code is very similar to it, but I can't figure out what's wrong.

Please help to correct my code.

pavelsr avatar Jul 26 '16 13:07 pavelsr

Try to connect via TCP

lsndr avatar Oct 02 '16 20:10 lsndr

Facing the same issue here!

@pavelsr Please share the solution if its found. Thank You.

Pradeepraj avatar Oct 06 '16 10:10 Pradeepraj

Same here

guilhem-fry avatar Sep 02 '17 06:09 guilhem-fry

Hi, can you help me ? i have error my request is: https://api.telegram.org/botapikey/auth.checkPhone?phone_number=number

sk3lk0 avatar Jul 16 '18 00:07 sk3lk0