Hi,
In the Download Tool's Header tab, is it possible to pass the Authorization token as a variable rather than a literal string?
I'm pulling down and capturing an Access Token, that I have named [RawToken], which has a 48 hour life span, from a server using an API. I would like to use the variable [RawToken] as the Authentication key in the Header tab of the Download tool. I have tried surrounding the name with brackets, then with braces, then with parenthesis. In my Results pane, I get the message "No authentication bearer token specified in authorization header".
Is it not possible to pass that token as a variable?
Thanks
Chris
Hi @Archaeopteryx I think I can help. There are 2 ways to pass headers: constants and fields. It sounds like you'll want you to use the fields section on the bottom of the headers tab:
The important thing is that you have to name your field appropriately as the field name is sent over in the call. So in your case, you may need to use a formula tool to create a field called "Authorization" and the formula would set it to [RawToken]. Or you could use a select tool to rename RawToken to Authorization.
Hope that helps!
EDIT: as an example, I have a workflow where I've hardcoded the content-type:
I could switch it to a variable like so:
A formula tool to set the variable. Here I'm just hardcoding it, but it could reference another column
And then my download tool to use that:
Patrick,
Thank you. "And values from these fields:" and renaming the field to "Authorization" did the trick.
Chris