I am making a GitHub app with its accompanying website. If a user installs my app, that unlocks some things on the website (incl. for other users). If the user uninstalls my app, I need to reliably detect that event, to lock those things back. However, I can’t seem to find any way to do that.
When a GitHub app gets uninstalled, only a Webhooks event seems to be generated about it, the delivery of which I might miss. There seems to be no direct API to query past installation changes (I checked that
?since= only lists installations that were added or changed, not removed.
My only other hope is to try to get a server-to-server token for a given installation id and then detect an auth error, but I can’t exactly poll GitHub against all my installation ids.