I have been following the dated and limited documentation on the E*Trade developer site and with help from some other stack overflow posts.
I am pretty certain that I have retrieved a good access token and secret. I have been following their snippets
request = new ClientRequest(); // Instantiate ClientRequest
request.setEnv(Environment.SANDBOX); // Use sandbox environment
request.setConsumerKey(oauth_consumer_key); // Set consumer key
request.setConsumerSecret(oauth_consumer_secret); // Set consumer secret
request.setToken(oauth_access_token);
request.setTokenSecret(oauth_access_token_secret);
AccountsClient account_client = new AccountsClient(request);
I also tried with:
MarketClient client = new MarketClient(request);
ArrayList<String> list = new ArrayList<>();
list.add("AAPL");
QuoteResponse response = client.getQuote(list, Boolean.FALSE, DetailFlag.ALL);
In all case, it returns a 401 code and a message of <Error> message>Unauthorized request</message></Error>
Is this something on the E-Trade end? Or something with my implementation of their snippets? I have reached out to E-Trade but thought I'd post here with the hope of a resolution.