I want to be able to provide the admin an option to remove my slack app from their workspace from my website (kind of like add to slack button but reverse of that).
I have a delete button which calls the apps.uninstall
method using the user token (XOXP). However I get a not_allowed_token_type
error response.
The web method documentation states that i can use an user token (no scopes) for this method. Any ideas what i am doing wrong?
From Android based phones and tablets:Under the applications, scroll and select Slack application. Click on Uninstall and select OK when prompted to uninstall the application.
View apps in your workspace From Slack on your desktop, you can view any apps installed to your workspace by other members. To open the app browser, click Apps in the top left of your sidebar. If you don't see this option, click More to find it.
An average app gets deleted in less than six days of install. Also, 3 in 10 users will uninstall an app within 30 days. But all is not left to chance. You can predict the reasons that will get your app to be deleted days after install.
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 useauth.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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With