WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.41k stars 1.18k forks source link

[BUG] WhatsApp OTP invalid #277

Closed neocol83 closed 10 months ago

neocol83 commented 1 year ago

When I try to login like Device, WhatsApp send me the OTP code but when put it code send me the next error:

response: { "autoconf_type": 1, "lid": "1620665979XXXX", "login": "573xxxxxxxxx", "secure_verifier": false, "security_code_set": false, "status": "ok", "type": "existing" }

this response is from whatsapp directly.

Somebody can solved this issue or know why is it happen?

Guilherme-j10 commented 1 year ago

I have the same problem and I believe I even created an issue about it #244

Auties00 commented 1 year ago

When I try to login like Device, WhatsApp send me the OTP code but when put it code send me the next error:

response: { "autoconf_type": 1, "lid": "1620665979XXXX", "login": "573xxxxxxxxx", "secure_verifier": false, "security_code_set": false, "status": "ok", "type": "existing" }

this response is from whatsapp directly.

Somebody can solved this issue or know why is it happen?

this is a successful response, it's not an error "status": ok

Auties00 commented 1 year ago

I have the same problem and I believe I even created an issue about it #244

"reason": "security_code" you have 2fa authentication enabled, which is not supported right now

neocol83 commented 1 year ago

I have tried with new number and register number but give me the same error

response: { "autoconf_type": 1, "lid": "216436588974089", "login": "57XXXXXXXXXX", "secure_verifier": false, "security_code_set": false, "status": "ok", "type": "new" }

Tue Jul 25 2023 11:00:26 GMT-0500 [ERROR] Mobile invalid OTP

Tue Jul 25 2023 11:00:26 GMT-0500 [ERROR] mobOtp: {}

I do not have active 2nd verification

Guilherme-j10 commented 1 year ago

It doesn't seem right to me, but this mobile api is a bit inconsistent, now I'm trying with numbers that don't have two-factor authentication and I'm asking to receive the OTP via voice and this is what it returns to me

{ email_otp_wait: 0, flash_type: 0, login: 'XXXXXXXXXXXXXX', reason: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

Auties00 commented 1 year ago

I have tried with new number and register number but give me the same error

response: { "autoconf_type": 1, "lid": "216436588974089", "login": "57XXXXXXXXXX", "secure_verifier": false, "security_code_set": false, "status": "ok", "type": "new" }

Tue Jul 25 2023 11:00:26 GMT-0500 [ERROR] Mobile invalid OTP

Tue Jul 25 2023 11:00:26 GMT-0500 [ERROR] mobOtp: {}

I do not have active 2nd verification

This is a bug, the response is actually correct so it should log in

Auties00 commented 1 year ago

It doesn't seem right to me, but this mobile api is a bit inconsistent, now I'm trying with numbers that don't have two-factor authentication and I'm asking to receive the OTP via voice and this is what it returns to me

{ email_otp_wait: 0, flash_type: 0, login: 'XXXXXXXXXXXXXX', reason: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

that means you got rate limited by WhatsApp / you are using a voip

Guilherme-j10 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não tem autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type: 0, login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

I didn't understand very well what do you mean I'm using a voip would this have to do with the fact that the number is connected on the desktop?

Auties00 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não tem autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type: 0, login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

I didn't understand very well what do you mean I'm using a voip would this have to do with the fact that the number is connected on the desktop?

yeah that's a voip, you can't use them on WhatsApp

Guilherme-j10 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

não entendi muito bem como assim estou usando um voip isso teria a ver com o fato do número estar conectado no desktop?

sim, isso é um voip, você não pode usá-los no WhatsApp

Okay I'll do a new test with a pure number

Guilherme-j10 commented 1 year ago

I just tested with a completely pure number and the return was the same, can you help me solve this problem? how could i disable VOIP so i can use normally?

Guilherme-j10 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não tem autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type: 0, login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

and even trying with sms the return is also the same

Auties00 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não tem autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type: 0, login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

and even trying with sms the return is also the same

as I said this is not a bug, you have to use real phone numbers

Guilherme-j10 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

The problem is that it's a real number, it's even my personal number that I've been using for years, if you want I'll send you the complete log on discord with a number so you can see that it's not a did but a real operator number

Davidaprilio commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

The problem is that it's a real number, it's even my personal number that I've been using for years, if you want I'll send you the complete log on discord with a number so you can see that it's not a did but a real operator number

yah same case here

i also used the number from the operator also got an error like that reason: 'no_routes', and after i chose sending otp using sms or voice the error became reason: 'too_recent' so i have to wait to get the reason: 'no_routes' error again

Guilherme-j10 commented 1 year ago

it's exactly the same as what's happening to me

Auties00 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

The problem is that it's a real number, it's even my personal number that I've been using for years, if you want I'll send you the complete log on discord with a number so you can see that it's not a did but a real operator number

yah same case here

i also used the number from the operator also got an error like that reason: 'no_routes', and after i chose sending otp using sms or voice the error became reason: 'too_recent' so i have to wait to get the reason: 'no_routes' error again

to know if it's a bug or not you can just try to register it from the Whatsapp app

fxj1997 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

The problem is that it's a real number, it's even my personal number that I've been using for years, if you want I'll send you the complete log on discord with a number so you can see that it's not a did but a real operator number

yah same case here i also used the number from the operator also got an error like that reason: 'no_routes', and after i chose sending otp using sms or voice the error became reason: 'too_recent' so i have to wait to get the reason: 'no_routes' error again

to know if it's a bug or not you can just try to register it from the Whatsapp app

It seems to be a new detection parameter recently updated

Davidaprilio commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

The problem is that it's a real number, it's even my personal number that I've been using for years, if you want I'll send you the complete log on discord with a number so you can see that it's not a did but a real operator number

yah same case here i also used the number from the operator also got an error like that reason: 'no_routes', and after i chose sending otp using sms or voice the error became reason: 'too_recent' so i have to wait to get the reason: 'no_routes' error again

to know if it's a bug or not you can just try to register it from the Whatsapp app

yes i received OTP from sms using app OTP

edited

then i tried again to run the code (i used example.ts) without logging out of the whatsapp app, and got a different error Failed to request registration code. Please try again. { login: 'xxxxxxxxxx', reason: 'code_checkpoint', status: 'fail' }

Davidaprilio commented 1 year ago

OKE Solved for me

I tried again a few minutes after the error reason: 'code checkpoint', and finally the otp code was successfully sent, I think for a new number it needs to be registered first using the whatsapp app then you can use it on baileys.

Successfully registered your phone number.

{
  autoconf_type: 1,
  lid: '187570113xxxxx',
  login: 'xxxxxxxxxxx',
  secure_verifier: false,
  security_code_set: false,
  status: 'ok',
  type: 'existing'
}
neocol83 commented 1 year ago

ok, I receive the OTP code but when I enter it it says invalid code

Guilherme-j10 commented 1 year ago

OKE Resolvido para mim

Tentei novamente alguns minutos após o erro reason: 'code checkpoint', e finalmente o código otp foi enviado com sucesso, acho que para um novo número ele precisa ser registrado primeiro usando o aplicativo whatsapp, então você pode usá-lo em baileys.

Seu número de telefone foi registrado com sucesso.

{
  autoconf_type: 1,
  lid: '187570113xxxxx',
  login: 'xxxxxxxxxxx',
  secure_verifier: false,
  security_code_set: false,
  status: 'ok',
  type: 'existing'
}

Your case is very specific. I understood your flow, you try to register the number for the first time in the application and then try again through the code and wait a moment try again and then the code is finally sent but from what I understand it continues with the whatsapp application open. If this was the official way to solve the problem, in my opinion, usability would be very bad, not to mention that like me, most people will try to register a number that is already registered to log in, I'm not sure but I think that must be it .

fxj1997 commented 1 year ago

OKE Resolvido para mim Tentei novamente alguns minutos após o erro reason: 'code checkpoint', e finalmente o código otp foi enviado com sucesso, acho que para um novo número ele precisa ser registrado primeiro usando o aplicativo whatsapp, então você pode usá-lo em baileys. Seu número de telefone foi registrado com sucesso.

{
  autoconf_type: 1,
  lid: '187570113xxxxx',
  login: 'xxxxxxxxxxx',
  secure_verifier: false,
  security_code_set: false,
  status: 'ok',
  type: 'existing'
}

Your case is very specific. I understood your flow, you try to register the number for the first time in the application and then try again through the code and wait a moment try again and then the code is finally sent but from what I understand it continues with the whatsapp application open. If this was the official way to solve the problem, in my opinion, usability would be very bad, not to mention that like me, most people will try to register a number that is already registered to log in, I'm not sure but I think that must be it .

The problem now is that the protocol code registration will be limited to one hour, and the real machine will not

salykingleb commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

Проблема в том, что это реальный номер, это даже мой личный номер, которым я пользуюсь годами, если хотите, я вышлю вам полный журнал регистрации в discord с номером, чтобы вы могли видеть, что это не did, а реальный номер оператора

здесь такой же случай, я также использовал номер от оператора и также получил подобную ошибкуreason: 'no_routes', и после того, как я выбрал отправку otp с помощью sms или голосовой связи, ошибка стала, reason: 'too_recent' поэтому мне приходится ждать, чтобы снова получить reason: 'no_routes' ошибку

чтобы узнать, ошибка это или нет, вы можете просто попробовать зарегистрировать ее в приложении Whatsapp

да, я получил OTP от sms с помощью приложения OTP

отредактировано

затем я снова попытался запустить код (я использовал example.ts), не выходя из приложения WhatsApp, и получил другую ошибку Не удалось запросить регистрационный код. Попробуйте еще раз. { login: 'xxxxxxxxxx', reason: 'code_checkpoint', status: 'fail' }

code_checkpoint is a captcha request during registration, pops up if SMS has already been repeatedly requested from the number. We have already made a commit for this

Guilherme-j10 commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

Проблема в том, что это реальный номер, это даже мой личный номер, которым я пользуюсь годами, если хотите, я вышлю вам полный журнал регистрации в discord с номером, чтобы вы могли видеть, что это не did, а реальный номер оператора

здесь такой же случай, я также использовал номер от оператора и также получил подобную ошибкуreason: 'no_routes', и после того, как я выбрал отправку otp с помощью sms или голосовой связи, ошибка стала, reason: 'too_recent' поэтому мне приходится ждать, чтобы снова получить reason: 'no_routes' ошибку

чтобы узнать, ошибка это или нет, вы можете просто попробовать зарегистрировать ее в приложении Whatsapp

да, я получил OTP от sms с помощью приложения OTP

отредактировано

затем я снова попытался запустить код (я использовал example.ts), не выходя из приложения WhatsApp, и получил другую ошибку Не удалось запросить регистрационный код. Попробуйте еще раз. { login: 'xxxxxxxxxx', reason: 'code_checkpoint', status: 'fail' }

code_checkpoint is a captcha request during registration, pops up if SMS has already been repeatedly requested from the number. We have already made a commit for this

Yes, but what is strange is the fact that no_route is coming in the OTP request and the phone number is the real operator

salykingleb commented 1 year ago

Não me parece certo, mas essa api móvel é um pouco inconsistente, agora estou tentando com números que não têm autenticação de dois fatores e estou pedindo para receber o OTP via voz e é isso retorna para mim { email_otp_wait: 0, flash_type : 0 , login: 'XXXXXXXXXXXXXX', motivo: 'no_routes', retry_after: 3600, sms_wait: 0, status: 'fail', voice_wait: 0, wa_old_wait: 0 }

isso significa que você tem taxa limitada pelo WhatsApp / você está usando um voip

e mesmo tentando com sms o retorno também é o mesmo

como eu disse isso não é um bug, você tem que usar números de telefone reais

Проблема в том, что это реальный номер, это даже мой личный номер, которым я пользуюсь годами, если хотите, я вышлю вам полный журнал регистрации в discord с номером, чтобы вы могли видеть, что это не did, а реальный номер оператора

здесь такой же случай, я также использовал номер от оператора и также получил подобную ошибкуreason: 'no_routes', и после того, как я выбрал отправку otp с помощью sms или голосовой связи, ошибка стала, reason: 'too_recent' поэтому мне приходится ждать, чтобы снова получить reason: 'no_routes' ошибку

чтобы узнать, ошибка это или нет, вы можете просто попробовать зарегистрировать ее в приложении Whatsapp

да, я получил OTP от sms с помощью приложения OTP

отредактировано

затем я снова попытался запустить код (я использовал example.ts), не выходя из приложения WhatsApp, и получил другую ошибку Не удалось запросить регистрационный код. Попробуйте еще раз. { login: 'xxxxxxxxxx', reason: 'code_checkpoint', status: 'fail' }

code_checkpoint - это запрос captcha во время регистрации, который появляется, если с этого номера уже неоднократно запрашивалось SMS. Мы уже сделали коммит для этого

Да, но что странно, так это тот факт, что в запросе OTP отображается no_route, а номер телефона является реальным оператором

if you often ask for SMS from this number, then this problem appears. Clean rooms are registered without problems

A-d-i-t-h-y-a-n commented 1 year ago

I have the same problem and I believe I even created an issue about it #244

"reason": "security_code" you have 2fa authentication enabled, which is not supported right now

I have implemented 2fa authentication verify function 😂🙌🏻

fxj1997 commented 1 year ago

I have implemented 2 step verification 😉

I have implemented 2 step verification 😉

Infinite no_routes problem?

Guilherme-j10 commented 1 year ago

I have the same problem and I believe I even created an issue about it #244

"reason": "security_code" you have 2fa authentication enabled, which is not supported right now

I have implemented 2fa authentication verify function joy🙌🏻

did you create a pr?

Auties00 commented 10 months ago

I'm choosing this issue as it's stale, if anyone experiences this, and is not using a voip, please create a new issue