To use the 'Schwab API', both an account and a registered
developer app are required. The developer app functions as a middle layer
between the brokerage account and the API. A developer app should be
registered on the Schwab
Developer site. Once logged in to the developer site, use My Apps to
register an application. An App will have a key and secret provided.
The Key/Secret is auto generated and can be found under
Dashboard > View Details at the bottom. The user must also create a Callback URL.
The Callback URL must be a valid URL. The example below assumes the Callback
URL is https://127.0.0.1. The Application should be in a "Ready to Use"
state before attempting to login.
This function will use these inputs to generate a URL where the user can
log in to their standard Charles Schwab Access Page and grant the
application access to the specific accounts, enabling the API. The URL
Authorization Code generated at the end of the log in process will feed into
schwab_auth2_refreshToken
. For questions, please reference the
Schwab
Docs or see the examples in the 'schwabr' readme.