Hi @dave2,
When you set up your OAuth app, you will provide an endpoint for deauthorization:
When someone uninstalls your app, an event will be automatically triggered and a payload sent to the designated endpoint. This will include the account ID, which you can see in this example:
Let me know if this helps to clarify.
Thanks,
Will