Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Rolando_Montero
Partner - Creator
Partner - Creator

Refresh API Token Dynamically

Hello everyone,

I fetching data from an API that requires a token that expires after a few minutes. It has a header that says X-Authorization and then the token I get from another API. Since I am not en API expert, I have checked a tutorial on how to make this dynamically instead of opening the connector every time the token expires. However, I keep getting errors. 

This is what my script looks like:

Here I fetch the token I need.

Rolando_Montero_0-1666361961029.png

The REST connection looks as follows 

Rolando_Montero_3-1666362305157.png

Rolando_Montero_4-1666362333991.png

Finally, this is the loading script

This is the second connection where I fetch the data that requires the token I mentioned.  I have read that when you use the statement WITH CONNECTION overrides the data you have set up on the REST connection. 

Rolando_Montero_2-1666362168846.png

After running the script, I get the following error

Rolando_Montero_5-1666362490196.png

 

I do not know if I have to add the X-Authorization statement in the script or if I am missing some parameters. 

 

I hope you can help me!

 

Thanks!

 

 

 

 

 

 

Labels (2)
0 Replies