SingleStepper / ETradetestApp

To develop basic functionality
0 stars 0 forks source link

The remote server returned an error: (401) Unauthorized #1

Closed chrisroden closed 3 years ago

chrisroden commented 3 years ago

Thank you for posting this code; it's a great time saver in getting up and running to test the APIs.

I've cloned the app and needed to inlcude my own Program.cs, AssemblyInfo.cs, and resource.resx since they weren't included in the repo. All appears to run; however, I'm getting the response "The remote server returned an error: (401) Unauthorized." after I login and enter the code from E*TRADE. I've checked the values and don't see anything that appears to be off. Are you able to get an access token using this code?

Thank you for in advance! Chris

SingleStepper commented 3 years ago

Hi Chris, I wrote this to try to get ETrade Auth to work, but couldn't achieve success. So I put it here for the people at ETrade to use, view, and fix -- it's so simple compared to their colossal sample app in Java -- which doesn't run!

Anyway, they said they can't look at third-party code, and from their lack of updating their sample apps, I decided to move on to Interactive Brokers, since they do provide lots of sample apps in multiple languages... including C#.

Also, I've read success stories about people getting Ameritrade OAuth to work... I have some links for Ameritrade https://www.reddit.com/r/algotrading/comments/914q22/successful_access_to_td_ameritrade_api/ and another https://www.reddit.com/r/algotrading/comments/c81vzq/td_ameritrade_api_access_2019_guide/

Best of luck!

chrisroden commented 3 years ago

Thank you for the reply and the info provided. I hope you find what you need. I'll let you know if I find a working sample for ETrade or get this project working.