andrewstuart / go-robinhood

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

Unable to login. looks like they broke it #28

Closed chennakrishna8 closed 2 years ago

chennakrishna8 commented 2 years ago

I am getting Invalid Header error when trying to get a client. Anyone else seeing the same issue?

vayias commented 2 years ago

Same here. I will post if I can find a workaround but currently unable to login. cc: @andrewstuart

chennakrishna8 commented 2 years ago

Same here. I will post if I can find a workaround but currently unable to login. cc: @andrewstuart

Thank you. I was unable to figure out a work around. Any help is greatly appreciated :)

andrewstuart commented 2 years ago

Alright, I think I got it figured out via the usual method: dev tools on the web login page. Try github.com/andrewstuart/go-robinhood/v2@v2.1.1-beta.2, and update username to your email address, and I think you should be set!

Let me know if that worked and I will merge and tag. cc: @vayias and/or @chennakrishna8

chennakrishna8 commented 2 years ago

@andrewstuart Thank you for looking into this. I tried using the latest version. I am stilll getting Invalid Authorization Header error. I was using my email as the username before too. This is the error message I am seeing

&{Status:400 Bad Request StatusCode:400 Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Allow:[POST, OPTIONS] Content-Length:[93] Content-Security-Policy:[default-src 'none'] Content-Type:[application/json] Date:[Fri, 03 Jun 2022 05:48:23 GMT] Server:[envoy] Trace-Uuid:[5e8d2fdc-0f61-4e51-97a1-10a43c5ac328] X-Content-Type-Options:[nosniff] X-Envoy-Upstream-Service-Time:[310] X-Frame-Options:[SAMEORIGIN] X-Robinhood-Api-Version:[0.0.0] X-Xss-Protection:[1; mode=block]] Body:{cs:0xc00026de40} ContentLength:93 TransferEncoding:[] Close:false Uncompressed:false Trailer:map[] Request:0xc000100200 TLS:0xc00038dc30}

May be they just blocked me.

chennakrishna8 commented 2 years ago

Alright. I am closing this issue. It worked as soon as I updated the device_token in the code to the one I found from the browser login. I will try to see if they accept a guid.

andrewstuart commented 2 years ago

I may still try to see if I can just pull the login page programmatically for the most recent device token to get around this permanently for people.

chennakrishna8 commented 2 years ago

I may still try to see if I can just pull the login page programmatically for the most recent device token to get around this permanently for people.

thank you so much.