Solved

Klaviyo profile-subscription-bulk-create-jobs not working on server

  • 30 January 2023
  • 6 replies
  • 874 views

Badge +1

Hi,

 

I am trying to create profiles in the klaviyo and add them to the list. Once the profile is created, we use the following code to add the profile to the list:

 

$this->client->post("https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", [

    'json' => [

        'data' => [

            'type' => 'profile-subscription-bulk-create-job',

            'attributes' => [

                "list_id" => $this->list_id,

                "subscriptions" => [

                    [

                        "email" => $email,

                    ]

                ]

            ],

        ]

    ]

]);

 

The issue is that this code works perfectly on the local computer but it does not work on the server hosted on digital ocean. On the server, we can create the profile via the API but can’t use this endpoint.

 

It returns an empty 202 response on both the personal computer and the server. So, it seem like either this endpoint is banned for my server or it is banned for server providers. I am using Digital Ocean.

 

Can you let me know if there is anything specific with this endpoint being banned? A lot of our klaviyo users are reporting this issue.

 

Thanks.

icon

Best answer by hamzaali 8 February 2023, 16:34

View original

6 replies

Userlevel 7
Badge +36

Hi @hamzaali and welcome to the Community!

 

The 202 response doesn’t necessarily mean that the endpoint is banned - as described here in our Developer portal, it actually means that the response has been accepted by the server but has yet to be acted upon, meaning that it will be processed asynchronously:

 

There are several reasons why the request may be processed asynchronously:

  1. You have double opt-in enabled. This means that profiles will receive a message requiring their confirmation before subscribing.
  2. You submitted more than 100 profiles, which is the maximum per our Developer Portal docs on this endpoint.

 

I would recommend investigating these two avenues first, and then perhaps give it some time and check later to see if the request processed.

 

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

-Brian

Badge +1

Hi,

 

  1. Double optin is disabled, so it is not the issue.
  2. I am adding only 1 profile

I have investigated everything in my knowledge. I am using the exact same API key and the list id to on both the local computer and the server. Running the exact same commands with exact same variable values. On local computer, contact is added within a second. On server, it never gets added.

 

I have tested one or two different API’s endpoints as well. They are working on both the server and local computer. Is there any ban list that klaviyo maintains for a specific endpoint?

 

Thanks.

Badge +1

Also, I contacted support via email about this. They replied but now I think my 60 days have passed since the account was created. I cannot reply to that email.

 

I am getting this error:

 

Mailing list expansion problem - Failed to insert message

 

Thanks.

Userlevel 7
Badge +36

Hi @hamzaali!

 

My apologies for the delay in my response - may I ask if you know how many profiles you are attempting to add to your account?

 

If there is a notably large amount of profiles being added to an account from one IP Address, it’s possible that address can be flagged for security reasons, and the call may not go through. Since the structure of your API call looks good and works locally, I would probably recommend reaching out to Support to check if they’ve received a flag on your IP Address. 

 

Thanks again for using the Community!


- Brian

Badge +1

Hi,

 

I did contacted support and the issue was resolved. It was because our IP was restricted because of adding too many contacts.

 

Thanks for your help.

Userlevel 7
Badge +60

Hey @hamzaali,

Thanks for following up and sharing the solution! 

As a note to others, I’ve also previously mentioned this sort of behavior which pertains to our list bombing behavior in the post below:

Thanks for being a part of the Community!

David

Reply