Skip to main content
Solved

Linking to an API URL


Forum|alt.badge.img+3
  • Contributor III
  • 5 replies

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?

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

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

4 replies

Brian Turcotte
Forum|alt.badge.img+37

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


Forum|alt.badge.img+3
  • Author
  • Contributor III
  • 5 replies
  • September 5, 2023

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

 

 


Forum|alt.badge.img+3
  • Author
  • Contributor III
  • 5 replies
  • 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
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • 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