Skip to main content
Contributor III
August 31, 2023
Solved

Linking to an API URL

  • August 31, 2023
  • 4 replies
  • 143 views

I am having trouble getting an API supplied URL to work as a hyperlink. When i use the event code and have it populate on it’s own (ie. a long url showing in the email) the link works, when I nest it in a hyperlink (so the long URL doesn’t actually show) I get an error code when trying to use the link.

Any idea why?

    This topic has been closed for replies.
    Best answer by David To

    Hey @MZeeb,

    That’s certainly an odd behavior. 

    In my experience, I suspect this may have something to do with the URL that’s being returned. Since you’re receiving an Access Denied message, I wonder if some part of the URL is omitted when accessed via a hyperlink. 

    I would also double check that the returning link is valid too. I’ve encounter some issues before where the profile being previewed had a broken link due to a minor integration interruption. 

    David

    4 replies

    Brian Turcotte
    Klaviyo Alum
    September 1, 2023

    Hi @MZeeb!

    Would you mind explaining a little more about the specifics of your use case? For example, what do you mean by API-supplied URL, and how exactly are you populating the event code you referenced?

    I think this will help myself and other Community members understand the issue better - so feel free to include screenshots and code if appropriate (with all sensitive information redacted).

     

    Best,

    Brian

    MZeebAuthor
    Contributor III
    September 5, 2023

    @Brian Turcotte Thanks! Here are some screen shots of what I am trying to link to in my email flow…

     

     

    MZeebAuthor
    Contributor III
    September 5, 2023

    And this is the error I receive when I test the email hyperlink vs. the link working and going where it is supposed to when it isn’t hyperlinked

     

    David To
    Klaviyo Employee
    David ToAnswer
    Klaviyo Employee
    September 8, 2023

    Hey @MZeeb,

    That’s certainly an odd behavior. 

    In my experience, I suspect this may have something to do with the URL that’s being returned. Since you’re receiving an Access Denied message, I wonder if some part of the URL is omitted when accessed via a hyperlink. 

    I would also double check that the returning link is valid too. I’ve encounter some issues before where the profile being previewed had a broken link due to a minor integration interruption. 

    David