thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.05k stars 526 forks source link

"Request contains an invalid argument." in auth.send_password_reset_email #330

Open Nv7-GitHub opened 4 years ago

Nv7-GitHub commented 4 years ago

I have an account in the firebase console, I have checked. I am able to log in to this account, and do other things with it. I then attempted to reset the account's password to what I know is a valid email. My line of code was:

auth.send_password_reset_email(<email>)

I received this error:

  File "<python file>", line 101, in forgot_password
    auth.send_password_reset_email(<code to get recovery email (I know it is valid)>)
  File "<virtualenv location>/lib/python3.7/site-packages/pyrebase/pyrebase.py", line 147, in send_password_reset_email
    raise_detailed_error(request_object)
  File "<virtualenv location>/lib/python3.7/site-packages/pyrebase/pyrebase.py", line 448, in raise_detailed_error
    raise HTTPError(e, request_object.text)
requests.exceptions.HTTPError: [Errno 400 Client Error: Bad Request for url: https://www.googleapis.com/identitytoolkit/v3/relyingparty/getOobConfirmationCode?key=AIzaSyDA8_QrwPNofp5gSjcFkle_hvjGbHs_C-o] {
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "errors": [
      {
        "message": "Request contains an invalid argument.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}