Skip to main content

Hey for some reason when I try to access newer endpoints I get a 401 not_authenticated response. I try to make the call like this: https://a.klaviyo.com/api/lists?key={key}. 
When I try to do this with v1 or v2 endpoints it is working. I noticed that in the newer endpoints, the authorization is in the headers while in v1 and v2 it's inside the URL like I showed. I tried to put the key in the headers but I still get the not_authenticated response. 

So how should I make the request for it to work?

Hi @raztamim!

I’m going to check on this with Engineering and I’ll update the thread ASAP!
 

Best,

Brian


Hi @raztamim!

I’m going to check on this with Engineering and I’ll update the thread ASAP!
 

Best,

Brian

Hey, any update? here is how I make the request: 

 


Hi @raztamim!

My apologies for the delay here - I actually addressed this in a different Community post here:

 

Essentially, you’re correct that calls to the new endpoints are no longer authenticated in the URL, but in the header. My intuition is that you may be missing the syntax ‘Klaviyo-API-Key your-private-api-key’ in the section you redacted in this screenshot.

 

So for example, if my API key was abcde12345, the Header would be:

Authorization: Klaviyo-API-Key abcde12345

 

Best,

Brian


Reply