Skip to main content
Solved

API migration Legacy v1/v2 -> new API


Forum|alt.badge.img
  • Contributor II
  • 3 replies

Hi all,

In the legacy API, both public and private API keys were acceptable as token authentication. What would you recommend as the best practice for transitioning to the new API without requiring users to update their current API keys? I aim to ensure a seamless transition where existing private keys function equivalently to public keys for users without necessitating any account modifications on their end.

Best answer by KeviSunshine

Hi @AW1,

We just went through a big Klaviyo APIs transition from v1 to v2. While there are a lot of changes with the new APIs, you can still use the same public and private keys as before, and they still have separate client-side and server-side APIs.

 

You will use the public key with the Client APIs, documentation here: https://developers.klaviyo.com/en/reference/create_client_subscription

 

The rest of those docs are focused on server side API calls. Here’s a link to the overview which talks about the client vs. server endpoints too: https://developers.klaviyo.com/en/reference/api_overview

 

Best,

Kevin.

View original
Did this topic or the replies in the thread help you find an answer to your question?

3 replies

KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 158 replies
  • Answer
  • May 15, 2024

Hi @AW1,

We just went through a big Klaviyo APIs transition from v1 to v2. While there are a lot of changes with the new APIs, you can still use the same public and private keys as before, and they still have separate client-side and server-side APIs.

 

You will use the public key with the Client APIs, documentation here: https://developers.klaviyo.com/en/reference/create_client_subscription

 

The rest of those docs are focused on server side API calls. Here’s a link to the overview which talks about the client vs. server endpoints too: https://developers.klaviyo.com/en/reference/api_overview

 

Best,

Kevin.


Forum|alt.badge.img
  • Author
  • Contributor II
  • 3 replies
  • May 15, 2024

Thanks @KeviSunshine!

So just to be sure I got your answer right, there’s no a single request (in the API) that works for both public or private. I need to perform client-side reqeust for public keys and server APIs for private? Am I right?


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 158 replies
  • May 15, 2024

Hi @AW1,

 

That’s right. You are 100% correct.

 

Cheers,

Kevin.