Last active
April 24, 2022 20:25
-
-
Save BryantAvey/8bb2bc11cebb8ab08f5944d090c4c37a to your computer and use it in GitHub Desktop.
TD Ameritrade API with Neo4j: Cypher to create a parameter for a reusable Access Token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parameterize the access bearer token | |
:param token => {CALL apoc.load.jsonParams("https://api.tdameritrade.com/v1/oauth2/token",null,"client_id=YOUR_CONSUMER_KEY_GOES_HERE%40AMER.OAUTHAP&grant_type=refresh_token&refresh_token=" + apoc.text.urlencode("YOUR_90_DAY_REFRESH_TOKEN_GOES_HERE_FROM_PREVIOUS_STEP")) | |
YIELD value | |
RETURN "Bearer " + value.access_token as access_token} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment