Skip to main content

Hi all.

From Klaviyo documentation I found:
When a user uninstalls your app from Klaviyo, ensure that the status reflects properly in your app, i.e., it appears as uninstalled on your app’s platform. 

What does it mean? Is Klaviyo sending me a webhook, or something to tell me that the app is removed? 
What is the best practice to handle app uninstall in Klaviyo side?
Fyi in my service side app removal works very well an it removes the app in klaviyo user account as well.

Thank you. 
Best regards.

Hey @arens.myzyri, Klaviyo doesn’t currently support webhooks for this.

 

The approach I’ve found most reliable is to handle OAuth refresh errors correctly. In particular, an invalid_grant error (documented here: https://developers.klaviyo.com/en/docs/troubleshoot_oauth_errors#error-descriptions-for-invalid-refresh-token) indicates that the user has removed the app from Klaviyo, which revokes all access and refresh tokens.

 

The behavior you’ll see is that an access token—while not yet “expired” based on its issuance—will start returning 401s, and the invalid_grant error will appear when attempting a refresh.

 

Since my app doesn’t check this every hour, I’ve added a “health check” that runs when users visit the integrations page to confirm their connection is still valid. If your app has more frequent background jobs, you could incorporate a similar check there.


Hey @arens.myzyri, Klaviyo doesn’t currently support webhooks for this.

 

The approach I’ve found most reliable is to handle OAuth refresh errors correctly. In particular, an invalid_grant error (documented here: https://developers.klaviyo.com/en/docs/troubleshoot_oauth_errors#error-descriptions-for-invalid-refresh-token) indicates that the user has removed the app from Klaviyo, which revokes all access and refresh tokens.

 

The behavior you’ll see is that an access token—while not yet “expired” based on its issuance—will start returning 401s, and the invalid_grant error will appear when attempting a refresh.

 

Since my app doesn’t check this every hour, I’ve added a “health check” that runs when users visit the integrations page to confirm their connection is still valid. If your app has more frequent background jobs, you could incorporate a similar check there.

Hi cadence, 
I think we will go with the same approach. If they visit our services I will try to generate access_token by using their refresh token. If it doesn’t work it mean that the app is removed. 
Thank you for the insights.


Reply