0

I am writing an app against the ETrade API. I am following this guide to authorize my app to my account. I can successfully get the request token and authorization URL. At the moment, I print the URL and copy/paste it into my browser. This requires copy/pasting the verification code into my app. I would rather programmatically open the URL and use a callback to receive this code.

The app is meant to run locally, not from a public web server. What is an appropriate callback URL? Can I use 127.0.0.1 or localhost? If so, how to I receive the consumer key? Do I need to accept an HTTP request on localhost inside a HTTP server?

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
  • You can normally use `localhost`, the callback is just a HTTP redirect. So the local browser would be redirected to the webserver running on the same host. – AChampion Aug 28 '17 at 02:52
  • @AChampion So I still need to register `localhost` as the call back with the OAuth provider, correct? And I will have to set up a basic HTTP server to handle the callback request? – Code-Apprentice Aug 28 '17 at 03:23
  • Yes, that is correct. – AChampion Aug 28 '17 at 03:27

0 Answers0