Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am currently facing a challenge in my Qlik Cloud environment related to the usage of the "with connection" statement.
I have a Qlik script where I obtain an access token, and I need to dynamically update subsequent REST connector calls with this token, as it otherwise expires every hour if I hard code it. I've noticed that the "with connection" feature is not working in my Qlik Cloud environment, preventing me from dynamically modifying the connection string within the script. It gives me this error:
------
The following error occurred:
(Connector error: "WITH CONNECTION" is not allowed. To allow
"WITH CONNECTION", select Allow "WITH CONNECTION" in the
connector settings.)
-------
Is the use of the "with connection" feature supported in Qlik Cloud? If not, are there alternative methods or best practices to dynamically update the connection string in Qlik Cloud scripts to handle scenarios like token expiration in REST APIs?
Thanks in advance.
I am sorry, but I hadn't seen that the solution was very simple.
There is a check box in the rest connector settings, that I can just tick, and now it all works.
Thanks a lot 🙂
Best,
Peter
Excellent, that is what I wanted to confirm, if the setting was marked or not.
Thanks for sharing @peter_nbc
here the resolution for the above error.
Hi @anat
Thanks a lot for the link.
Bit this is only regarding Qlik Sense Enterprise, correct?
I don't think I can use that solution in Qlik Cloud?
Best,
Peter
Hello @peter_nbc,
You mean that you are using the feature on Qlik Cloud as below and is not working for you?
Cheers,
Albert
Also please check - Using pagination with selected REST sources | Qlik Cloud Help
Select and load data from a REST data source | Qlik Connectors Help
Cheers,
Albert
I have also posted in the other forum, but I will post it here as well, just in case:
----
I have attached to pictures to this post about regarding the error.
The first one is my script I am trying to load. First I get an access token (this part works fine). Then I store that access token in a variable and use it in the next rest connector using "With connection". The reason I need this, is because the access token is only valid for 1 hour, so I need to do it this way in order to make it dynamic and make it fetch a new token every time I run the script.
The second picture is the error message I get, when I try to run it.
Do you have any ideas on how to fix this?
Best,
Peter
Hello @peter_nbc,
Can you also share a screenshot of the connector setting, the "Additional request parameters" section.
Thanks in advance!
Cheers,
Albert
I am sorry, but I hadn't seen that the solution was very simple.
There is a check box in the rest connector settings, that I can just tick, and now it all works.
Thanks a lot 🙂
Best,
Peter
Excellent, that is what I wanted to confirm, if the setting was marked or not.
Thanks for sharing @peter_nbc