Skip to main content
Problem Solver I
February 20, 2024
Solved

identify request return "Unable to parse exchange token"

  • February 20, 2024
  • 4 replies
  • 192 views

what I do
connect js from Klaviyo
<script async type="text/javascript" src="//static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script>
than
<script>klaviyo.identify({"email":"some_email@gmail.com"});</script>
in response I see
{
    "errors": [
        {
            "id": "03a6717c-f05d-4e85-8cc3-b58f5baef53d",
            "status": 400,
            "code": "invalid",
            "title": "Invalid input.",
            "detail": "Unable to parse exchange token.",
            "source": {
                "pointer": "/data/attributes/_kx"
            },
            "meta": {}
        }
    ]
}
What I do wrong?

    This topic has been closed for replies.
    Best answer by dbpdev

    pls close these one as resolved issue was in 1 letter (capitalize) of api key… omg..

    4 replies

    Klaviyo Employee
    February 20, 2024

    Hi!

    Try replacing `PUBLIC_API_KEY` in your script snippet with your public key, found under Settings > Account > API Keys

    Thanks,

    Jason

    dbpdevAuthor
    Problem Solver I
    March 22, 2024

    I used right API key, what it can be?


    ______
    ticket is not solved!

    dbpdevAuthorAnswer
    Problem Solver I
    March 22, 2024

    pls close these one as resolved issue was in 1 letter (capitalize) of api key… omg..

    Brian Turcotte
    Klaviyo Alum
    April 1, 2024

    Hi @dbpdev!

    Thanks for coming back to the Community to share your solution!

    Best,

    Brian