Skip to main content
Contributor II
May 15, 2024
Solved

API migration Legacy v1/v2 -> new API

  • May 15, 2024
  • 3 replies
  • 203 views

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.

    This topic has been closed for replies.
    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.

    3 replies

    KeviSunshine
    Expert Problem Solver III
    Expert Problem Solver III
    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.

    AW1Author
    Contributor II
    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
    Expert Problem Solver III
    May 15, 2024

    Hi @AW1,

     

    That’s right. You are 100% correct.

     

    Cheers,

    Kevin.