@joelhess we have done a execution listener that runs at the Start of the task and gets the key and saves it as a local variable in the Task.
We have also done a reusable script that gets the token and passed into the secondary function: this was done using the pattern from jsoup: Replacing Http-Connector with Jsoup usage