Skip to main content
Solved

Best way to refresh integration status

  • November 26, 2024
  • 5 replies
  • 37 views

Forum|alt.badge.img

Hello, I am a developer integrating Klaviyo in our app.

I am looking for the right way to know if a user has uninstalled the link to our app from Klaviyo’s side.

What I was going to do:
requesting for a new refresh token and if I get an error that it has been revoked, then I can remove it. 
This solution looks a bit “hacky” and might not be the best way to refresh the status of the integration.

I guess the best way would be to have a webhook for that, or maybe an endpoint to call. But I can’t find neither of those in the documentation :/

Should I proceed with my hacky solution, or do you have a better solution to suggest?

Fyi, currently using: https://github.com/klaviyo/klaviyo-api-node

Best answer by jeremykanso

In the end, I might just need an endpoint to ping klaviyo and know if a token has been revoked or not.

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

5 replies

  • Klaviyo Employee
  • 4 replies
  • November 26, 2024

Hi Jeremy - 

Would the status of mobile push consent meet this need? That is returned from the Get Profile/Get Profiles endpoint, like:

        "mobile_push": {
          "marketing": {
            "can_receive_push_marketing": true,
            "consent": "SUBSCRIBED",
            "consent_timestamp": "2023-02-21T20:07:38+00:00"
          }
        }

You do need to request “subscriptions” in the additional-fields parameter.


Forum|alt.badge.img
  • Author
  • Problem Solver I
  • 3 replies
  • November 27, 2024

Hi Ryan,

Thanks for answering!
I guess that might work, I’ll test it.


Forum|alt.badge.img
  • Author
  • Problem Solver I
  • 3 replies
  • November 27, 2024

@ryankelly Ok I didn’t understand why you suggested that. Now I get it and I think you didn’t understand my need:

=> My question was not to know if a profile disabled notifications but if an integration has been removed.

See this page: https://www.klaviyo.com/integrations


Forum|alt.badge.img
  • Author
  • Problem Solver I
  • 3 replies
  • Answer
  • November 27, 2024

In the end, I might just need an endpoint to ping klaviyo and know if a token has been revoked or not.


  • Klaviyo Employee
  • 4 replies
  • November 27, 2024

@jeremykanso ah, yes, I misunderstood what you were after. As you found, we don’t currently have an endpoint to validate the status of an Oauth app install.

I think your solution does make sense in the meantime.

Tagging in ​@chloe.strange for viz.