andrewstuart / go-robinhood

A golang library for interacting with the Robinhood private API
Apache License 2.0
68 stars 34 forks source link

Robinhood 2FA #27

Closed aleph0ne closed 2 years ago

aleph0ne commented 3 years ago

Anyone have a solution for this? Robinhood now requires 2FA (two-factor authentication) and this API library returns an error.

Get "https://nummus.robinhood.com/accounts/": Two Factor Auth code required and not supplied

cc @andrewstuart @MitchK

andrewstuart commented 2 years ago

I believe that you may need to implement a check for that error, and then through presumably SMS, have a way in your automation to update your 2fa code on the TokenSource: https://pkg.go.dev/github.com/andrewstuart/go-robinhood/v2#OAuth. The next Dial attempt, once that's triggered to send to you by the first login, then updated via reading stdin (or whatever), I believe you should be good. It's been a long time since I've tested that, though.

andrewstuart commented 2 years ago

Feel free to reopen if you still have the issue.