robinhood-unofficial / pyrh

Python Framework to make trades with the unofficial Robinhood API
https://pyrh.readthedocs.io/en/latest/
MIT License
1.77k stars 603 forks source link

'email code' blocker #277

Closed JudeSafo closed 3 years ago

JudeSafo commented 3 years ago

I'm hitting: "No 2FA Given email code:" prompt when i reach the rh.login(username=USERNAME, password=PASSWORD) step

Have not been able to proceed past this step.

which prevents me from

Checklist

Description

Steps/Code to Reproduce

Results

Versions

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Benboykin08 commented 3 years ago

I'm not sure if you are still running into this issue but I found a way around this by using pyotp and also enabling 2FA in robinhood app and using the google authenticator option it should look something like this:

import pyotp import robinhood_stocks as r

totp = pyotp.TOTP("codefromRH").now() print("Current OTP:", totp)

totp = pyotp.TOTP("codefromRH").now() login = r.login(username='username', password='password', mfa_code=totp)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.