Uninstall intimidation for an integration

So we are building an hubspot integration for our platform, hubspot allows the client to uninstall an integration through the hubspot portal (dashboard).
Is there any way to intimidate the integration that the user has uninstalled the integration.
Maybe a webhook?
So we can handle it and remove the access_token and other config on our end.

Hi, @sanjayortiz.

This is a good question. I don’t know of any method off the top of my head (the Webhooks API will not work), but am checking internally.

Thanks for your patience.

Hi, @sanjayortiz.

At this time, when your app is disconnected from a client account, it will not trigger a formal notification. The most common workaround is to listen for failed requests.

I understand how this may be a pain point, though, and I have shared the need with my team.

@IsaacTakushi to add onto this discussion.

The way we are checking if a user is still active is to try refresh the API tokens, and if the refresh fails we assume it’s a disconnect.

We’ve noticed the disconnect can take up to 6 hours to reflect in the API tokens. Is there a more correct method to validate that our app is still installed on the account?

Hi, @sketchy.

Thanks for jumping in. Sincere apologies for the delayed response.

You could try querying the Get information for OAuth 2.0 refresh token endpoint. After uninstalling an app from my account, requests to this endpoint immediately threw 404 errors.

Let me know if this works for you!

Hi Everyone,

is this still open and there’s no webhook on app uninstall yet ?