I’m currently developing an application scenario where I need to intermittently delete messages sent by users to channels. For this purpose, my application should exclusively be installed with administrator privileges. Hence, I intend for my application to be installed using the Installing with OAuth
option. In this scenario, upon an administrator’s installation attempt, following the requisite routing steps, a token will be generated, transforming into the user token.
However, upon accessing the OAuth & Permissions
section on the Slack application screen, I notice that the User OAuth Token
changes every time the application is installed, displaying only a single token. If a unique token is generated for each admin user from distinct workspaces, why does the application settings screen exhibit only one token? In the event that my application is installed across various workspaces by different workspace admins, how can I ascertain that when I attempt to delete a message, it’s from the correct workspace? How can I differentiate which workspace these user tokens correspond to?
Let’s assume my application is installed across 5 different workspaces, resulting in the creation of 5 distinct admin user tokens. If I store these user tokens, will I be able to utilise the relevant user token when deleting a message? Many thanks!