Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
edwinwitvoet
Contributor III
Contributor III

How to use variable's in REST connector (mailchimp 3.0)

Using the Qlik Sense REST API connector for Mailchimp 3.0 using 'create a new connection' works well, but does not allow using variables to connect to Mailchimp's v3.0 API for querying specific campaign-id's dynamically.

Typically this is what you want when fetching the available campaigns and the statistics for all of these campaign-id's.

So, I'd like to be able to pass the campaign id as a variable.

Other articles on this community forum do address some examples with google analytics, but from that I was not yet successful in deriving the way to go for mailchimp.

I was trying to use the 'CUSTOM CONNECT TO' approach but somehow I couldnt get the authorization correctly

This is what I used (note : the variable part in this example would be the apikey)

CUSTOM CONNECT TO "Provider=QvRestConnector.exe; 

  url=https://us2.api.mailchimp.com/3.0/reports; 

  timeout=30;method=GET; 

  PaginationType=None;Authorization=apikey:<apikey>;"; 

This is what I got

QVX_UNEXPECTED_END_OF_DATA: HTTP protocol error 401 (Unauthorized): Requested resource requires authentication.

Any suggestions?

3 Replies
Anonymous
Not applicable

Looks like your first problem is authorization so you need to get that sorted out before passing parameters.

I get a connection OK with the following settings

Did you try to force basic authentication?

Does the URL prefix, eg us9 match your apikey suffix eg a2a2a2a2a2a2a2a2a2e4e4e4e4e4e4e-us9 ?

birchgold
Contributor II
Contributor II

Tim,

I haven't had any success with this either. My URL prefix matches my API suffix.
I also set the same settings as you did above with the data is not being retrieved.
Thanks,

Anonymous
Not applicable

As a wild guess try using [] instead of "", as in :

CUSTOM CONNECT TO [Provider=QvRestConnector.exe;

  url=https://us2.api.mailchimp.com/3.0/reports;

  timeout=30;method=GET;

  PaginationType=None;Authorization=apikey:<apikey>;];

Also are you using a dollar expansion of a variable assigned a value using LET ?

  • If so then make sure you use single quotes and not double quotes

Another also is to maybe look into disabling Standard Mode Disabling standard mode ‒ Qlik Sense

  • I have had to do that recently to get an API url to work - But do beware the security implications of this.