rghuckins / robinhood-google-sheets

Robinhood Custom Functions for Google Sheets 📈
147 stars 48 forks source link

error on load #2

Open atomantic opened 6 years ago

atomantic commented 6 years ago

Getting an Error on load with the following tooltip output:

Cannot find method put(string,(class),(class)). (line 78).

I'm not seeing a call to api.robinhood.com in the loading sequence.

Perhaps this is failing because of MFA... investigating...

westonplatter commented 6 years ago

@atomantic could you confirm that MFA caused the error?

atomantic commented 6 years ago

Yes--after trying it a few more times, I realized Robinhood was sending me a lot of MFA codes :)

It appears they have interfaces for working with the MFA endpoint so it can probably be added.

westonplatter commented 6 years ago

Hmm, I continued to get errors. Not sure why. I removed MFA but the issue persisted.

rghuckins commented 6 years ago

I can look into this when I have some free time. Admittedly, I haven't touched this code or used these functions in quite some time. Of course if anybody has found a fix, any contributions here are welcome.

jWhytis01 commented 6 years ago

All,

I am also receiving the message: Cannot find method put(string,(class),(class)). (line 80).

I added two lines of logging to getClassicToken_:

function getClassicToken_() { var url = robinhoodApiBaseUrl + '/api-token-auth/'; var payload = { 'username': robinhoodUsername, 'password': robinhoodPassword }; var options = { 'method': 'post', 'payload': payload, 'muteHttpExceptions': true }; var response = UrlFetchApp.fetch(url, options); var responseJson = JSON.parse(response.getContentText()); var classicToken = responseJson.token; Logger.log(responseJson) Logger.log(classicToken) return classicToken; }

And the log reads: [18-08-09 11:14:02:625 EDT] {non_field_errors=[Unable to log in with provided credentials.]} [18-08-09 11:14:02:625 EDT] undefined

Can anyone confirm their creds are working with the existing code?

Thanks, Jason