aurbano / robinhood-node

:chart_with_upwards_trend: NodeJS client for Robinhood Trading :fire:

Home Page:https://aurbano.github.io/robinhood-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to login anymore

polygrimm opened this issue · comments

Seems like they changed mfa_code way to oauth2.

Currently this code fails

var credentials = require("../credentials.js")();
var Robinhood = require('robinhood')(credentials, function(){
    console.log(Robinhood.auth_token());
        //      <authenticated alphanumeric token>
}

Error is :

          throw new Error('token not found ' + JSON.stringify(httpResponse))
          ^

Error: token not found {"statusCode":404,"body":"<h1>Not Found</h1><p>The requested URL /api-token-auth/ was not found on this server.</p>","headers":{"date":"Thu, 20 Sep 2018 03:05:48 GMT","content-type":"text/html; charset=utf-8","content-length":"89","connection":"keep-alive","server":"nginx","vary":"Accept-Language, Cookie","x-robinhood-api-version":"1.246.7","content-language":"en-us"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"api.robinhood.com","port":443,"hostname":"api.robinhood.com","hash":null,"search":null,"query":null,"pathname":"/api-token-auth/","path":"/api-token-auth/","href":"https://api.robinhood.com/api-token-auth/"},"method":"POST","headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate","Accept-Language":"en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5","Content-Type":"application/x-www-form-urlencoded; charset=utf-8","Connection":"keep-alive","X-Robinhood-API-Version":"1.152.0","User-Agent":"Robinhood/5.32.0 (com.robinhood.release.Robinhood; build:3814; iOS 10.3.3)","content-length":41}}}

update to the latest version. this was fixed.