Skip to main content
Solved

Klaviyo sdk


Hi

 

I was just wondering. Where can I find the latest version of the klaviyo-php sdk?

 

Thanks.

Adrian

ECOVIB2D

Best answer by alex.hong

Hi @tudsy,

Can you confirm that you used a Private not Public API key when working with your account and the API? 

I don’t believe it is an IP block related issue but it wouldn’t hurt for you to actually work with our support team on this case since they would have better access to your account and can work with private information.

 

Thanks!
Alex

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

3 replies

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • May 27, 2022

Hi @tudsy,

Welcome to the Community.

You can find all information regarding the Klaviyo SDK here.

 

Thanks!
Alex


  • 0 replies
  • May 30, 2022

Hi

 

I am getting error 503 when trying to add people to my profile section.

 

The following code is what I use to add people to my list (Single opt in):

 


<?php

$Email = "second@ecovib2d.com.au";
$phone ="0413242417";
$name = "Adrian Tudini";
$age = "51";

include '/home/ecovibdc/vendor/autoload.php';
include '/home/ecovibdc/vendor/guzzlehttp/guzzle/src/Client.php';

$client = new Client();

$response = $client->request('POST', 'https://a.klaviyo.com/api/v2/list/SXxfVK/subscribe?api_key=********************************', [ 
  'body' => '{"profiles":[{"email": "'.$Email.'"},{"phone_number": "'.$phone.'","sms_consent":true}]}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();

?>

The basis of this code is the klaviyo API on how to subscribe a customer to a list in my klaviyo account.

 

Thanks. 


alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • May 31, 2022

Hi @tudsy,

Can you confirm that you used a Private not Public API key when working with your account and the API? 

I don’t believe it is an IP block related issue but it wouldn’t hurt for you to actually work with our support team on this case since they would have better access to your account and can work with private information.

 

Thanks!
Alex