Creating a laxative canal using the slack app

I have a private application for slack (developed by user "X" from the "XT" team)

I have a web server that knows how to complete the Oauth process and generate tokens for each command.

Now, as user Y from the YT team, I install the slack application on my YT team and get the token,

using this token I am making an API call for channels.create ,

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

BUT he wrote that the channel was created by a specific user who installed the slack application, that is, user Y.

I would expect this channel to be created by an application not by a specific user. Is there any way to do this?

I thought about using a bot token (obtained from the instlation application), but channels.create could not be executed by the bot

+1
source share
1 answer

I am afraid there is no solution for your problem. Each action to β€œwrite” to Slack must be bound either to the bot or to the user. And since channels.create cannot be used by the bot, it must be a user.

The main access token for your Slack application is associated with the user who installed it, so this user will be displayed as the creator of the channel when using it.

I use the general admin user ("slackadmin") for this purpose on my own Slack, but this, of course, will not work as a general solution for every Slack team that wants to install your application from the Slack App directory.

+4
source

Source: https://habr.com/ru/post/1013260/


All Articles