How to check and see if app install is still valid?

authentication
jira-cloud

#1

When building a JIRA Cloud app and handling the install/uninstall web hooks…there’s still a chance an uninstall payload could get lost in the ether. (Blame the :turtle:.)

Is there a reliable way to check to see if a JIRA Cloud instance still has our app installed? Obviously we could try to check server info and see if the credentials are still valid (i.e. we can authenticate). Or similar. Just wondering if there’s a more direct way.

Thanks!


#2

Yes - the uninstall call can get lost - so you’re not wrong in thinking of that happening. There are also the cases where Atlassian kills the instance (you don’t get a uninstall call then either).

Best thing is to check once a day against the license api ( https://developer.atlassian.com/platform/marketplace/license-api-for-cloud-apps/ has it documented - remove /wiki for Jira ). Then after X days of sequential non access then you can probably guarantee that the instance is gone and it’s not just a networking issue.


#3

Ah, really nice tip on Atlassian removing the instance. Didn’t think about that.

Thanks, that’s perfect. :+1:


#4

Aside to @daniel : Thanks for the suggestion - I’ve put in a revision for that documentation page to make it clear that Jira and Confluence have separate URIs for the license resource.