slackapi / python-slack-sdk

Slack Developer Kit for Python
https://tools.slack.dev/python-slack-sdk/
MIT License
3.85k stars 837 forks source link

SDK/API enabling public distribution #1346

Closed luka-mikec closed 1 year ago

luka-mikec commented 1 year ago

Hello, I am wondering if the following can be performed using either the Slack HTTP API or any of the SDKs (preferably Python).

After creating the app via manifest, is it possible to generate a link to install the app to an arbitrary workspace, i.e. enable public distribution?

I would like to automate Slack bot creation, but since a workspace should be able to have many of these bots, I need an automated way of creating apps. Creating apps via manifests works well, but apps are private by default, and making them public requires using the UI.

Note I do not have any kind of access to the end-users Slack, I'm only able to provide the installation link to the end-user.

seratch commented 1 year ago

Hi @luka-mikec, thanks for the question!

After creating the app via manifest, is it possible to generate a link to install the app to an arbitrary workspace, i.e. enable public distribution?

Yes, on the Slack app admin page side, you need to do the following:

To learn how to serve the redirect url, please refer to the following documents:

I you haven't written any code yet, we highly recommend using bolt-python (https://github.com/slackapi/bolt-python) for your app devleopment. The framework makes your app development significantly easier and faster.

I hope this helps.

luka-mikec commented 1 year ago

Hi @seratch, sorry, I'm aware that setting public distribution be achieved in the UI. Is it possible to do it through some API or SDK, without any work in the UI?

seratch commented 1 year ago

@luka-mikec It's not feasible via API / SDK. You need to use the UI for it.

luka-mikec commented 1 year ago

Thanks @seratch, are there any plans to add such support? I know that creating apps via manifests (with API/SDK support) is in beta, maybe this is something that will be added? My impression was that manifests are supposed to capture all the project's settings, so I expected this would be supported too. This public distribution is I think the only thing not supported at the moment (along with setting the app's icon, but that's not very important for my use case)

seratch commented 1 year ago

@luka-mikec My short answer is "probably no". The app manifest is used by the next-generation platform too and it works without any UI interactions. However, it does not support public distribution and it won't at least in the foreeable future. Considering the future-gen's direction, I cannot tell whether and when such an enhancement can come to the the existing app management way.

seratch commented 1 year ago

Perhaps, I don't have any further information that I can share with you on this topic at this moment. Would you mind if we close this issue now?

luka-mikec commented 1 year ago

@seratch I see, thanks, that's a bit sad to hear as this prevents apps to be instantiated fully without UI.