The reason why you get this error is that apps.uninstall
only works with workspace apps and workspace tokens. Workspace apps is a new kind of Slack app, that is currently still in development and available under "Developer Preview"
I could not get it to work either for my Slack app, so opened a support ticket and got this answer from the Slack team. Its actually stated in the documentation, but it also wrongly states that you can use a user token. The alternative solution is to use auth.revoke
to revoke all tokens from your applications.
Here is what the documentation says:
This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app.
Here is the reply I got from the Slack team in full:
apps.uninstall
is only for workspace apps. There's no way to revoke every token for a traditional app, you'll need to use auth.revoke
on each token. This is on the documentation page but its pretty hard to see (and actually incorrect as it states you can use user tokens which is incorrect).