Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Download tool - updating headers

tomdockerill
6 - Meteoroid

Hi all,

 

I've been playing around in Alteryx trying to replicate a Postman process. I've so far managed to build an Authorization step by connecting a Text-Input tool to a Download tool (using POST) to generate a Token, and parse it.

 

Now I want to be able to stream that token in to a new GET download tool (as the token expires every 6 minutes) so I don't have to manually input the Bearer + [Token] each time. I've scoured online guides but I'm just not having any luck. Does anyone have any suggestions? 

 

Thanks!

5 REPLIES 5
danilang
19 - Altair
19 - Altair

Hi @tomdockerill 

 

Use 2 Download tools. The first gets the auth token and stores it in a field. The second takes the value of this field and attaches it as header field

 

 d.jpg

 

Name the token field from the 1st download tool the same as the header token field name from the API

 

Dan    

tomdockerill
6 - Meteoroid

Hi Dan,

 

Currently I have two headers in the second Download tool - Authorization (where the value is supposed to be 'Bearer + Token') and Accept (where the value is 'application/json') 

 

When I run this workflow, but enter the token in to the Header window myself, it successfully downloads the data. But when I have the 'add value from these fields' and pull in the token field, it returns [] in the 'DownloadData' field 

 

I've tried your suggestion and it also just returned [] in the DownloadData field! Not too sure where I'm going wrong, still

 
danilang
19 - Altair
19 - Altair

Hi @tomdockerill 

 

Since you've got a space between "Bearer" and your token, you may need to URL encode this in your formula.  I don't know if the download tool does this automatically for header values taken from a field

 

Dan

 

 

 

dphowie
6 - Meteoroid

Just got my API working thanks to this thread. I didn't need to encode the token, but did have to update the column header to match the api documentation. After that, everything worked great!

vamsey
8 - Asteroid

hi All,

I encountered with the similar issue can any one help me in resolving this.

Labels