I am working on a slack bot for a basic queue system. People that want help from a subject matter expert give a command “/take-a-number”, and the asker is given a number, and added to the queue. The expert then does a “/next-number” command to work their way through the queue, first-in-first-out.
My proof of concept works between the person who installed it and other people on the workspace (the person who installed it can be the expert or the asker, it doesn’t matter), but when two other people try to use “/take-a-number”, I get an error: channel_not_found
Currently, I’m using:
user_id = request.form.get('user_id')
channel_id = request.form.get('channel_id')
response = userClient.conversations_members(channel=channel_id)
if response['ok']:
for member in response['members']:
if member != user_id:
return member
return "None"
This works great when the DM is between the installer and any other person, but not between two people that are not the installer, in which I get “channel_not_found”.
The user scope permissions I’ve tried are:
chat:write
Send messages on a user’s behalfim:history
View messages and other content in a user’s direct messagesim:read
View basic information about a user’s direct messagesim:write
Start direct messages with people on a user’s behalfmpim:history
View messages and other content in a user’s group direct messagesmpim:read
View basic information about a user’s group direct messagesmpim:write
Start group direct messages with people on a user’s behalfusers:read
View people in a workspace
Permissions like “admin.users:read” and “admin.conversations:read” do not allow my app to be installed on the workspace, because I don’t pay for enterprise slack.
I’ve also read that each user might have to authorize the app individually, but I haven’t figured out how to do that or prompt for that.
Jon E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.