Skip to main content
Solved

How to know why Klaviyo rejected a request to the track API endpoint


Forum|alt.badge.img+2

Klaviyo is rejecting requests to the track API endpoint for one of our customers. Since the response returns with a status of 200 and a body of 0 it’s impossible to know why. Is there a way we can figure out why a request is being rejected?

Best answer by Dov

Hi @Anthony Smith,

Thank you for sharing your question with the Klaviyo Community.

While there is no report specifically outlining why a request gets rejected, there are a few steps you should follow to triage the issue.

  1. Verify that the JSON is valid. You can check http://jslint.com/ to verify that the payload you’re sending is formatted correctly. 
  2. Ensure that your base64-encoded string is also url-encoded.
  3. Cross-reference your request with the examples we have in our Track API documentation. One common mistake is the private api key is used in the request when the public api key is required or vice versa. In this case, the request will return a body of 0.

Thanks and have a great day.

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

3 replies

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • May 6, 2021

Hi @Anthony Smith,

Thank you for sharing your question with the Klaviyo Community.

While there is no report specifically outlining why a request gets rejected, there are a few steps you should follow to triage the issue.

  1. Verify that the JSON is valid. You can check http://jslint.com/ to verify that the payload you’re sending is formatted correctly. 
  2. Ensure that your base64-encoded string is also url-encoded.
  3. Cross-reference your request with the examples we have in our Track API documentation. One common mistake is the private api key is used in the request when the public api key is required or vice versa. In this case, the request will return a body of 0.

Thanks and have a great day.


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • June 11, 2021

We still have a large number of events that get rejected from Klaviyo for no discernible reason. We ensure the URL is base64 encoded and URL encoded. Valid JSON. We use a public API key. Still getting 0 responses.


Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • June 15, 2021

Hi @Anthony Smith,

Thanks for the follow-up note.

Can you post an example payload and redact any sensitive information like the API key and email address? Happy to have a look for you.