We basically want to annotate certain messages (adding links) but it does not seem to be possible using Slack API. Only way to modify is to give permission to the user who posted that message and modify it as that user. I can delete other users comments or file.
I have tried to update others messages using legacy token, app token's with full permissions but no success. I called Slack API as a owner or admin.
I used chat.update Slack api method.
The response from the api call is an error "cant_update_message"
"headers": {
....
},
"ok": false,
"error": "cant_update_message"
}
It is only possible to edit your own messages (assuming this is allows in your workspace), but never the messages of others. That is the same for all users including admins and owners. And its the same with the API method chat.update.
But there is a workaround: Your app can gather tokens from every user in your workspace and then use those token to impersonate each users allowing your app to change every message. This will require each user to install the app once. Your app then just needs to use the matching token to update each message.
Note that this workaround has some obvious drawbacks, e.g. giving your app access to all message and channels on the workspace and also requires some organizational effort to maintain.
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