How to get an Authentication Code with TDAmeritrade API.

Made Easy

Scott
2 min readMay 29, 2020

Credit to Sigma Coding for if it weren’t for his video, I would still be trying to figure this out as of your reading.

Look at this URL

https://auth.tdameritrade.com/auth?response_type=code&client_id=MOBI%40AMER.OAUTHAP&redirect_uri=
  • code is a hard coded value. Let it be.
  • client_id is your api key followed by MOBI%40AMER.OAUTHAP
  • redirect_uri is can be found here. It does feel sketchy to put a url within a url but trust me, its okay.

When you have these values paste them into the url above. Then paste that url in the browser. This is the login screen you normally see when you sign into your account. However, with your newly filled out url, it will take you to a response that supplies you with an access token.

It is sketchy.
Follow the prompts
If you are using Safari.
This is OK

Do not fear.

Usually seeing the word Fail is a bad thing, meaning something you wanted to happen failed. But in the url that now is populated in your browser the code value is filled. Copy the url in your browser window and paste it somewhere safe. The value for code is your Access Token.

--

--

No responses yet