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?