Solved

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


Badge +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?

icon

Best answer by Dov 6 May 2021, 16:05

View original

3 replies

Userlevel 7
Badge +61

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.

Badge +2

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.

Userlevel 7
Badge +61

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.

Reply