Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random 400 error code on login/send-code/ #16

Open
AaditT opened this issue Dec 14, 2023 · 17 comments
Open

random 400 error code on login/send-code/ #16

AaditT opened this issue Dec 14, 2023 · 17 comments
Labels
bug Something isn't working

Comments

@AaditT
Copy link
Contributor

AaditT commented Dec 14, 2023

i am getting random 400 error code on the login/send-code/ endpoint. sometimes it works with success, sometimes i get this 400 error code.

can you please provide some clarity as to why i am getting this error, or possibly fix? thanks!

@chemokita13
Copy link
Owner

Are you using allways the international phone code?

@ninoturakura
Copy link

ninoturakura commented Dec 14, 2023

I have exactly same issue, I've checked the endpoints and the second one is failing
here is the endpoint 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?key='
it just returns basic info about the error
statusText: 'Bad Request',
any clues what can be happening?

@ninoturakura
Copy link

also I tried using my phone number with and without country code but still got the same issue

@AaditT
Copy link
Contributor Author

AaditT commented Dec 15, 2023

Are you using allways the international phone code?

Yes, I am using +1XXXXXXXXXX

@chemokita13
Copy link
Owner

Hey! @AaditT @ninoturakura Thank you for the details given, I will work on it, but that seems it wont be as faster as others bugs

@chemokita13 chemokita13 added the bug Something isn't working label Dec 17, 2023
@chemokita13
Copy link
Owner

Hey! @AaditT @ninoturakura I have implemented a log system in the server, could you resend the recuest to see the logs saved?

@AaditT
Copy link
Contributor Author

AaditT commented Dec 18, 2023

hey @chemokita13 , will let you know when I face this issue again.

@ninoturakura
Copy link

Hey @chemokita13 thanks for the reply, I've tested this login endpoint from a different country number than mine. Btw I'm from Georgia and any number from here is failing, I have seen similar issue happening in other repos as well, it's not only my country but some of the other country numbers face the same issue as well. when I tried like a french number it gave me session and everything went smooth.

maybe this can give you some insight to what can be happening here, also it's not only you, I also tested different respositories all of them have the same issue.

@ninoturakura
Copy link

ninoturakura commented Dec 18, 2023

also what I've noticed when testing those repos is that all of them plus yours as well had the same user client, it seemed to me that you all copied this info from each-other. maybe that's the case that instead of apple user client that you have I need something other? or maybe some API keys that were used in your app does not work on every country's numbers? maybe for my country I need different api key?

@ninoturakura
Copy link

@chemokita13 also can you tell me, how did you get those API keys and stuff? Since when I tried it with MitmProxy it does not work, since the SSL certificate is changed and those googleApi's demand specific SSL certificates.

if you could just give me little hint at least on how you got those API keys, I could test it on beReal from my location, and maybe figure out why is it giving me that error of 400.

@chemokita13
Copy link
Owner

@chemokita13 also can you tell me, how did you get those API keys and stuff? Since when I tried it with MitmProxy it does not work, since the SSL certificate is changed and those googleApi's demand specific SSL certificates.

if you could just give me little hint at least on how you got those API keys, I could test it on beReal from my location, and maybe figure out why is it giving me that error of 400.

I just have taken the api keys decoding bereal apk, if you want u can use it

@chemokita13
Copy link
Owner

@AaditT @ninoturakura I made another way to login instead of that for throwing 400 error, could you try it?
I let the link to the API:
https://berealapi.fly.dev/api#/Login/LoginController_SendCodeVonage

@ninoturakura
Copy link

@chemokita13 I tried it still no luck(( it says OTP not sent, also can you please add those change to this github repo as well? I could not find that in local api docs

@ninoturakura
Copy link

ninoturakura commented Dec 18, 2023

@chemokita13 I also tried same, to decompile APK file at first, but this is what I get about the second api (www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode):

  public final void Q0(g paramg, me paramme) {
    String str = ((g)paramg).y;
    if (!TextUtils.isEmpty(str))
      ((kf)X0()).e = str; 
    df df1 = this.w;
    d.i(df1.a("/sendVerificationCode", this.B), (gf)paramg, (xf)paramme, i.class, ((cf)df1).b);
  }
  

which is pretty unusable not to mention that I could not detect any API keys needed to communicate with the Google API.

@ninoturakura
Copy link

@chemokita13 I've used apktool for APK decompilation, did you used same tool as well? or maybe something different?

@artyaz
Copy link

artyaz commented Dec 25, 2023

idk if that is directly related, but I'm getting the same 400 code when trying to login
CleanShot 2023-12-25 at 03 17 13@2x

the same with vonage
CleanShot 2023-12-25 at 03 19 51@2x

it hasn't worked at all

@WilsonCazarre
Copy link

I'm also having this issue. It seems like it doesn't even get to make the request to send the OTP. It fails while trying to verify the Google API Client
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants