Skip to main content

Hello,

First, congrats on the new API release, I’m excited to work with it!

Since we are now dealing with API scopes attached to API keys, I was wondering if there was an API that would tell me what are the scopes attached to an API key? I can’t seem to find any in the doc/OpenAPI spec.

Perhaps something like :

curl --request GET \
--url 'https://a.klaviyo.com/api/key-scopes'
--header 'Authorization: Klaviyo-API-Key {my-private-api-key}'


That would answer with :

{
  "data": t"Catalogs Read", "Catalogs Write"]
}



Thanks!

Hi @SmashPops and welcome back to the Community!

 

This is great question! At this time, there’s no supported endpoint to retrieve the scope of an API key. However, another Community member asked a similar question here, so I will definitely submit a request with our product team, as I agree that this would be a great feature!

 

I hope this helps to clarify, and thanks for using the Community!

- Brian


Hello Brian,

Oops, sorry for the duplicate content!

And thank you for your answer. Well, for now I’ll use a workaround then : calling an endpoint that requires some scopes and see if I’m rejected with a 403 HTTP status code (instead of a 400 for instance), which would mean that my token doesn’t have the required scopes.

Anyway, thanks again!
William


any updates?

 


Any updates? It would be super useful to make a single call and get this info


Reply