I want to have channel where users can ONLY send messages in threads. Is it possible? I tried with Stacktodo, but I did not found a way to do it.
Yes, Slack allows to restrict write access to channels, but only for the #general channel. There you can restrict access to admins only or even owners only.
If you want to restrict write access to other channels or use a more granular access list you need to use a Slack app like Stacktodo (with their so called Block Bot) or build your own Slack bot that provides that additional functionality.
Please contact the support team from Stacktodo if you can not get it to work.
Related
I want to receive all the events/messages coming and going from all the users to all the channels or other users in a workspace.
There is a way to get messages of a particular user(sending/receiving) by creating an app and using event subscription(https://api.slack.com/apps/A01SP2TL45B/event-subscriptions?).
Is there anything like this available to get all users' events?
There is discovery.user.conversations
This method lists IDs for all conversations (channels and DMs, including public, private, org-wide, and shared) a user is in
Is there a way to keep my Slack App from being used in Channels?
I only want the current user to be able to interact with the App directly and it not to show in any channels.
When setting up a app in MS Teams using App Studio there is a option that lets you limit the App to "Personal" I'm looking for something similar in Slack.
I am not sure what use cases you want to prohibit exactly, but in general your app can check each incoming request and decide if and how it wants to react to it.
For example you will always get the user ID of who sent the slash command or message to the bot. You can use that to filter our users that should not have access.
Update
To restrict your app the the app channel you need to do the following:
When receiving a request from the user, first open a direct message channel to the user from the bot user. That will always give you the channel ID of the app channel.
Then reply with a direct message in that app channel
or alternatively check if the received request is from the app channel and ask the user to only talk in app channel if it is not.
See also this answer on how this works in detail.
I want to restrict users to add another user into channel. All I want is if I am adding a new user into a channel a notification triggers to the admin and once admin approves it then only that user can be added. Is this possible in Slack using Slack API. If yes, then what can be the workflow for this?
I got the answer. Following APIs can be used to achieve the same
channels.kick for Public channels
groups.kick for private channels
We have created a Custom Integrations Incoming WebHooks configuration so that we can post notification from our CI pipeline into our slack channel. This works great so far, but today a colleague accidentally broke it by changing the target channel. Fortunately, there was a notification about this in our channel ("removed an integration from this channel: incoming-webhook"), so we were able to revert this quickly. But things would have been worse if the colleague only had regenerated the webhook URL... Naturally, we'd like to avoid this.
So, I am wondering if it is possible to restrict write access to our Incoming WebHooks configuration?
There seems to be a restriction if the target channel is private ‒ but I'd prefer that we can leave our channel public.
Incoming Webhooks count as Apps and the permission to modify them can be restricted to members with certain roles in the Slack workspace settings.
Most Slack admins will restrict access to managing apps to owners only and give that critical role to a few trusted members only.
If your incoming webhooks are Internal integrations and not Slack apps, then restricting them can be a problem. A solution would be to embed the incoming webhooks in a regular Slack app, which can be restricted.
Today I got a response from Slack support, and they say that they don't have a fine-grained permission model for controlling access to specific configurations. The only options are "everyone can change the configuration" or "only one person can edit the configuration".
The "only one" option is enabled by changing the "Post to Channel" property to a private channel (or direct message). Note that this doesn't mean that the configuration is restricted to the specified channel. Custom Integrations Incoming WebHooks allow the sender to override the channel, so the configuration may still be used to post to public channels.
I want to create a bot that deactivates users under some criteria. I can not find any slash command that deactivates user accounts for free slack groups. I only see the option to kick from channel.
For paid versions the following can be used:
https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.setInactive.md
You can't do that. Slack exposes a SCIM API for user management, but it is not available for free teams.
To my knowledge there is no API methods to "kick" users automatically that works for free slack teams, so you will have to manually deactivate users you want to kick.
As a workaround I have a small bot running on my slack teams that report daily in a special admin channel which users need to be manually deactivated. That works of course only if you have a hard criteria that you can use to can test if a user is still eligible to be member of your Slack team.