Klaviyo api connection

Does anyone have experience with setting up Klaviyo API call? I was able to use their api packages in postman. I created the public key and my private key, stored the public in the appropriate collection spot in Create Client Subscription (per the instruction video they have). I’m trying a very simple Get Campaigns endpoitn API pull. I’m looking to get Campaign name, campaign id, sent date. you also have to filter to the appropriate channel, can’t aggregate in the pull.

Here is the base URL and at least one mandatory filter (i set to email (choices are email, sms, mobile_push).

I set this as the authentication - response headers:

This is from Postman.com that I’m trying to replicate (notice the mandatory filter):

IN the params field - keeping it simple to only the one mandatory filter:

From the authorization tab in postman -

The private key is saved as a collection and automatically passes through.

IN the output, I notice the public CID that I entered in the Client Subscription -

In postman - i get an output:
image

But when I run in KNIME - it’s a 401 error.

I know the credentials all work, because it worked in Postman, so I’m clearly doing something wrong? User error? ID-10-T error? :slight_smile: (idiot). If anyone has experience, help would be greatly appreciated.

Hello @ebarr,

I checked Klaviyo API docs and it seems you are doing it right except the “CID” header that I’m not sure why you have it there. In the docs, I only see “Authorization”, “accep” and “revision” and no “CID”.

I would first try removing this header (unless I’m missing somehting?) and if still you get 401, then I would double check my key (Authorization) and make sure it follows this format (which looks correct in your screenshot):

Klaviyo-API-Key <your-private-api-key>

1 Like

thank you, I got it to work

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.