1
votes

I have a private slack application (developed by user 'X' from team 'XT')

I have a web server knows how to complete the Oauth process and generate tokens per teams

Now- as a user Y from team YT I am installing the slack app on my YT team and get a token,

using that token I perform API call for channels.create ,

I got into my team (aka YT) and indeed I see that the channel was created ,

BUT it's written that the channel was created by the specific user that installed the slack app, meaning user Y.

I would expect to see that channel was created by the application not by specific user. Is there any way to do that ?

thought about using bot token (got from the app instllation) but channels.create cannot be performed by a bot

1

1 Answers

5
votes

I am afraid there is no solution for your problem. Every "write" action on Slack has to be attached to either a bot or a user. And since channels.create can not be used by a bot, it has to be a user.

The master access token of your Slack app is linked to the user that installed it, which is why that user will appear as creator of the channel when you use it.

I use a generic admin user ("slackadmin") for that purpose on my own Slack, but that will of course not work as general solution for each Slack team that want to install your app from the Slack App Directory.