Help With Klaviyo API Authenticate

Hi,

I’m turning to you experts out there.

So I’m trying to authenticate to Klaviyo using the “Make an API Key Auth request” module.

I’m very troubled by what to put where so that I can successfully authenticate and move forward.

Here are screenshots of what I’ve been doing.
For info, I’m trying to access this Klaviyo’s end point (if I can call it this way).

In the first screenshot, this is what I put when adding a new keychain.
Then, on the module itself:
I have passed an URL like mentioned in the Klaviyo’s Doc.
Method is a get method
Now when it comes to the header, this is where I’m stuck.
In the doc it mentions that authorization has to be in the header. I know that when I set the keychain, it already asks where to pass that info.
When I leave the header empty in the module, I still get a 401 error.
When i put what’s on the screenshot, I get a 401 error.
(See other screenshot).

Now my question is “how do i authenticate” ?

I’ve been trying this for a few days and it’s starting to drive me crazy.

All the answers I see online say : Here’s the right syntax for the authentication: Klaviyo-API-Key your-private-api-key ← that comes from the Klaviyo’s doc.

That’s great but how do you apply this to Make.com???
I really need your help as it’s the last piece of my automation and I need this to work but I find little to no info on this (or when someone’s succeeded to solve this, the details provided are so little, it’s almost useless :smirk:).
Thanks in advance for your help and advice.

Jay
Screenshot 2023-06-17 at 10-02-00 test gs klaviyo Make


Screenshot 2023-06-17 at 10-05-03 test gs klaviyo Make

Very soon (and I mean very, very soon :wink:) we’ll be releasing a new Klaviyo app based on the latest Klaviyo API, including a shiny :sparkles: brand new Get Segment Profiles module, as well as a Make an API Call module to simplify reaching any of the API endpoints we haven’t included.

The existing Klaviyo app is based on their older API which will stop working on 1st Jan 2024.

Unfortunately the new API is sufficiently different that we couldn’t provide a simple upgrade path as we usually do - you will need to replace each module with the corresponding (or better) one from the new app.

1 Like

@Pup_Ster

It seems your configuration it not entirely right when using HTTP Request.

According to the documentation from Klavyio | API (klaviyo.com) or Authenticate (klaviyo.com) they used Header Authorization

curl --request GET \
     --url https://a.klaviyo.com/api/{endpoint}/ \
     --header 'Authorization: Klaviyo-API-Key {your-private-api-key}' \
     --header 'accept: application/json' \
     --header 'revision: {revision-header}'

It’s good to mention the header revision documentation: API versioning and deprecation policy (klaviyo.com)

So, this print shows an example that follows what is in the doc:

Metadata:

Name: Klaviyo API Key Auth key
Key: Klaviyo-API-Key HERE-PUT-THE-PRIVATE-KEY
API Key parameter name: Authorization
URL: https://a.klaviyo.com/api/segments/XZ62Tx/profiles
Headers-Item1:
    Name: revision
    Value: 2023-02-22
QueryString-Item1: 
    Name: additional-fields\[profile\]
    Value: 
QueryString-Item2: 
    Name: fields\[profiles\]
    Value: 
QueryString-Item3: 
    Name: filter
    Value: {{encodeURL("email: any")}}
QueryString-Item4: 
    Name: page\[size\]
    Value: 2

@AndyDaSilva52 Thank you !!!

The most obvious is usually not the most obvious for some …

What I couldn’t figure out what that “Klaviyo-API-Key your-private-api-key” and now, it makes sense that it’s what you should be passing when you create the keychain.
Thank you so very much, you’ve been a massive help !!