Server Side Call (Klaviyo)

Hi,

I have created an event for the product wishlist and it is registered correctly in klaviyo. Now I want to be able to retrieve that data in the store and they tell me that I should make a server-side call but they don’t tell me where.

From support they have told me that you have to do it from a personalized app. I have prepared the environment (node.js, pnpm, shopify cli, etc.) And I have a new app created.
The goal is to retrieve the data from klaviyo (products in a wishlist) and display it on a page for the customer

Can someone tell me where to implement the code?

Thank you

1 Like

You can implement the code to retrieve the data from Klaviyo in your Shopify app, either in a custom app proxy or a Shopify Embedded App.

If you’re using a custom app proxy, you can make the server-side API call to Klaviyo within the proxy endpoint, process the response data and return it to your front-end code.

If you’re using a Shopify Embedded App, you can use the Shopify App Bridge to make the API call from the front-end code, using the fetch or axios library for example, and then display the data on the page for the customer.

In either case, you’ll need to authenticate the API call to Klaviyo, which can typically be done using an API key or OAuth authentication.

1 Like

Thanks for your answer.

I can’t make the call from the front because it would expose the klaviyo api key. It must be a server side call.

Hello @olasunkanmi ,

I have not yet advanced with this topic. Do you know any tutorial that can guide me?