Authorize Application
Overview
Allows the user to authorize the consumer application.
Description
Once your application has the request token, it should redirect the user to an E*TRADE authorization page, as shown in the URL below. Include the request token and your consumer key as parameters in the URL as shown. The page at this URL asks the user to authorize your application. Upon approval of the authorization request, E*TRADE generates a verification code. By default, E*TRADE then displays this verification code in an "Authorization Complete" page, allowing the user to manually copy the code and paste it into your application. However, the recommended alternative is for E*TRADE to pass the verification code directly into your application via a pre-configured callback URL. Using a callback requires that the callback URL be associated with your consumer key in the E*TRADE system. To request this, follow the instructions in our Authorization guide chapter (separate from this API reference). Your callback URL can be just a simple address, or can also include query parameters. Once the callback is configured, users who approve the authorization request are automatically redirected to the specified URL, with the verification code appended as a query parameter. Examples are shown in the Sample Response below. URL
https://us.etrade.com/e/t/etws/authorize?key={oauth_consumer_key}&token={oauth_token} HTTP Method: GET
Request Parameters
Response Properties
Sample Request
https://us.etrade.com/e/t/etws/authorize?key=282683cc9e4b8fc81dea6bc687d46758&token=%2FiQRgQCRGPo7Xdk6G8QDSEzX0Jsy6sKNcULcDavAGgU%3D
Sample Response
As described above, the authorize call is not a REST API in the usual sense, and does not return a "response" in the usual way. If the user authorizes your application on the E*TRADE authorization site, the result is either the display of a verification code at that site or, if a callback is used, a redirect to your callback URL. In the callback scenario, the verification code is appended to your callback URL as an oauth_verifier parameter. Here are two examples: https://myapplicationsite.com/mytradingapp?oauth_verifier=WXYZ89
https://myapplicationsite.com?myapp=trading&oauth_verifier=WXYZ89 Notes
|