slackapi / java-slack-sdk

Slack Developer Kit (including Bolt for Java) for any JVM language
https://slack.dev/java-slack-sdk/
MIT License
568 stars 210 forks source link

Slack API that allows me to call to install an app on a specific channel and remove an app on a specific channel #1315

Closed yingzit123 closed 1 month ago

yingzit123 commented 1 month ago

I hope to develop project that allows me to install an app on a specific channel on slack and remove the app on a specific channel. I have looked through the documentation and saw that there an admins.app.uninstall which uninstall an app from one or many workspaces, or an entire enterprise organization. However, this does not meet my requirement. Is there a way to fulfill my task?

Thanks.

The page URLs

https://api.slack.com/methods?query=admin

seratch commented 1 month ago

Hi @yingzit123, thank you for writing in. Unfortunately, there is no way to install an app into only a specific channel. Your app needs to be installed at the workspace/org level. I understand this is not satisfactory for you, but I hope this clarifies things.

yingzit123 commented 1 month ago

Hi Seratch. Thank you for your rapid response! I understand. I just want to make sure I explain my question clearly. Let me explain it again cause I am not sure if it may or may not be related to installation problem. I have a tool that react to an emoji in some of the selected channel like sending message in the thread after person in the channel add a emoji as response to a message. I am implementing a UI that hopefully can allow me to add and remove channel for this functionality. Is there such an api for me to do so? Or I still have to do the operation manually on slack api web page. Thanks again!

seratch commented 1 month ago

The following APIs are available for your use case:

Once you add the required scopes for these APIs, your app will be capable of creating and ~deleting~ archiving channels.

seratch commented 1 month ago

If you meant adding/removing your app's bot user in a channel, the following ones should be useful for it:

yingzit123 commented 1 month ago

Thanks. So do you mean that by using the join and leave api, I can add the support bot to this channel and remove it from the channel instead of manually clicking the add apps to add bot to this channel? The attachment is what I am talking about.

Screenshot 2024-05-24 at 4 41 20 PM
seratch commented 1 month ago

Yes, I do. You can try the APIs out to see how they work. It seems there is no other question here. Would it be fine for you to close this issue now? Thanks again for building Slack apps using this SDK!

yingzit123 commented 1 month ago

Yes. Please close this issue. Thank you so much! That's very helpful.