jmfernandes / robin_stocks

This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
http://www.robin-stocks.com
MIT License
1.74k stars 468 forks source link

Can't login via API anymore #151

Open dapenchwr2001 opened 4 years ago

dapenchwr2001 commented 4 years ago

Something happened. I was able to login before, and then it threw this error: "ERROR: There was an issue loading pickle file - logging in normally." I tried this solution in https://github.com/jmfernandes/robin_stocks/issues/44 and it didn't work. I then noticed that my 2factor AUTH setting was turned off somehow.

I reset the password and changes the 2factor AUTH Code . Still didn't work. Re-installed robin-stocks too.

Still throwing "Exception: Unable to log in with provided credentials."

I can login to robinhood via phone and desktop browser just fine.....

Any idea what is happening?

beastdk2000 commented 4 years ago

I had a very similar error. I got the pickle file error message, but then was allowed to enter my MFA code. Subsequently, my 2factor AUTH code was turned off. Now my command prompt just closes after launching the python program.

dapenchwr2001 commented 4 years ago

@beastdk2000 how did you fix it?

jmfernandes commented 4 years ago

@dapenchwr2001 when calling the login function have you tried setting the store_session=false parameter? If store_session is set to false then login will not try to load a pickle file.

dapenchwr2001 commented 4 years ago

@jmfernandes i have, and it still giving me the same error. "Exception: Unable to log in with provided credentials."

beastdk2000 commented 4 years ago

@beastdk2000 how did you fix it?

@dapenchwr2001 - My comment was just to say I was having issue too. However, after I turned 2FA back on, the issue went away. Interestingly though, when I run the script I no longer receive an SMS and no longer need to enter the code I expected to receive via SMS. It seems like a security issue to me, but for now I'm okay with it.

Saylux commented 4 years ago

I have the same issue. I have tried enabling and disabling 2FA, switching my password to only alpha-numeric, uninstalling and re-installing, my friend uses the same code segment and his is working. I have the remember session setting set to false. Every. Possible. Thing. It never sends me an SMS

Saylux commented 4 years ago

Oops, I solved this right after. So, I take this back. I was being an idiot and figured it out a few hours later.

Basically I typed in GmailAccountName@google.com instead of GmailAccountName@gmail.com

I didn't catch it because I was focused on the spelling and my mind auto-corrected google to gmail.

ddkr4ever commented 2 years ago

I finally got around to figuring this out. Robinhood set a new max expiration time. The old default causes a 401 error. The new expiration time needs to be 704623