zerobias / telegram-mtproto

Telegram client api (MTProto) library
MIT License
620 stars 136 forks source link

Flood errors without evidence #125

Closed dundas closed 5 years ago

dundas commented 6 years ago

I keep on receiving flood errors using my phone number which prevents me from testing:

Flood error! It means that mtproto server bans you on 82736 seconds
[5.346] Error 420 FLOOD_WAIT_82736 2 1
Unhandled rejection (<{"code":420,"type":"FLOOD_WAIT_82736",...>, no stack trace)

The server setting {dev:true} does not deliver the text message with the code. How do you receive them on your phone, or on your account with this setting?


const server = {
  dev: true
}

I also tried using the phone and the code in the examples:

const phone = {
    num: '+9996620000',
    code: '22222'
}

But then I receive a different error:

{ _: 'auth.sentCode',
  flags: 1,
  phone_registered: true,
  type: { _: 'auth.sentCodeTypeSms', length: 5 },
  phone_code_hash: 'f4318de66cb2db3f10' }
[7.458] Error 401 SESSION_PASSWORD_NEEDED 2 1
[7.731] Error 401 AUTH_KEY_UNREGISTERED 2 1

Can anyone help me figure out how I test with my phone number in development mode and still receive the code?

Thanks!

mamatt78 commented 6 years ago

That's a really good question, i have the same problem :/