{"id":2338,"date":"2026-01-21T07:36:19","date_gmt":"2026-01-21T08:36:19","guid":{"rendered":"http:\/\/gogetmuscle.com\/?p=2338"},"modified":"2026-01-21T17:45:09","modified_gmt":"2026-01-21T17:45:09","slug":"hubspot-public-app-uninstall-flow-and-oauth-best-practices","status":"publish","type":"post","link":"http:\/\/gogetmuscle.com\/index.php\/2026\/01\/21\/hubspot-public-app-uninstall-flow-and-oauth-best-practices\/","title":{"rendered":"HubSpot Public App Uninstall flow and OAuth Best Practices"},"content":{"rendered":"

Hi, I have built a calling integration app. Everything is working fine, but I am stuck with the uninstall flow. When a user uninstalls the app from HubSpot (Settings \u2192 Integrations \u2192 Connected Apps \u2192 Uninstall), how can I remove the related database entries from my MongoDB? In my database, I store the installed app data such as portal ID, user ID, access token, and refresh token. How does the uninstall flow work? Please suggest the correct approach and best practices. Also, please suggest best practices for storing OAuth access tokens and refresh tokens, handling token refresh, and app verification\/validation.<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"

Hi, I have built a calling integration app. Everything is working fine, but I am stuck with the uninstall flow. When a user uninstalls the app from HubSpot (Settings \u2192 Integrations \u2192 Connected Apps \u2192 Uninstall), how can I remove the related database entries from my MongoDB? In my database, I store the installed app […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/2338"}],"collection":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/comments?post=2338"}],"version-history":[{"count":1,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/2338\/revisions"}],"predecessor-version":[{"id":2339,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/2338\/revisions\/2339"}],"wp:attachment":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/media?parent=2338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/categories?post=2338"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/tags?post=2338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}