Skip to main content
Solved

Blocked when trying to call the API

  • May 14, 2025
  • 4 replies
  • 105 views

Forum|alt.badge.img+4

Hi!

So I’m trying to call the URL https://a.klaviyo.com/api/metrics in the API, and since yesterday, I’m getting blocked by Klaviyo and I receive these errors:

Is there a way I could authenticate my calls so that I’m not blocked by Klaviyo? I’ve been calling the API for a few years now without problems, it all began yesterday.

Thank you!

 

--Marie

Best answer by whereisjad

@Nymesia Could excessive calls from your server have resulted in your IP address being temporarily blocked from making further API requests?

To prevent this issue, I recommend implementing rate limiting in accordance with the guidelines outlined here: 

https://developers.klaviyo.com/en/docs/rate_limits_and_error_handling#rate-limits

In the meantime contact support as outlined here to get yourself unblocked.

4 replies

whereisjad
Expert Problem Solver IV
Forum|alt.badge.img+16
  • Expert Problem Solver IV
  • Answer
  • May 14, 2025

@Nymesia Could excessive calls from your server have resulted in your IP address being temporarily blocked from making further API requests?

To prevent this issue, I recommend implementing rate limiting in accordance with the guidelines outlined here: 

https://developers.klaviyo.com/en/docs/rate_limits_and_error_handling#rate-limits

In the meantime contact support as outlined here to get yourself unblocked.


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • May 15, 2025

@whereisjad The thing is we already have rate limiting in place that respects the limits per the documentation, so I would have thought it would be enough. But thanks for the support link!


emma.owens
Community Manager
Forum|alt.badge.img+21
  • Community Manager
  • May 16, 2025

Hi ​@Nymesia ! 

I can see that your team has submitted a support ticket - which is what I was going to suggest so they could take a deeper look at this! 

If you are provided a solution, please don’t hesitate to share that here so others that experience this in the future can reference this post! :)


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • May 21, 2025

Ok, so we found the problem!

Our request server is on Azure and we use a reverse proxy as our rate limiting system. The request between Azure and our rate limiting system contains the header X-Original-URL, which is violating this CVE (this bit of information was given to us by Klaviyo’s support team). This header was also transferred to our request to Klaviyo’s API. However, Klaviyo’s API Cloudflare layer blocks calls which contains the header X-Original-URL, so all our calls were blocked.

To solve the problem, we removed this header in our request to Klaviyo’s API and it looks like it’s working!