Skip to content

Instantly share code, notes, and snippets.

@timhodson
Last active April 19, 2016 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timhodson/db7f899bbdea2ffb78c8996437e3e04b to your computer and use it in GitHub Desktop.
Save timhodson/db7f899bbdea2ffb78c8996437e3e04b to your computer and use it in GitHub Desktop.
Use the persona-token script in a sub shell to get the token for your request.
# Here we assume that $TALIS_API_CLIENT_ID and $TALIS_API_CLIENT_SECRET are set in your environment
# A sub shell runs the persona-token script and will return the token we need in the Authorization Bearer header.
curl -v -X GET -H "Authorization: Bearer $(persona-token $TALIS_API_CLIENT_ID $TALIS_API_CLIENT_SECRET)"\
-H "Cache-Control: no-cache"\
"https://rl.talis.com/2/$TENANT_SHORT_CODE/lists/$LIST_GUID"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment