Description
When utilizing an account-level oauth app, the following two apis above only work if the user who installed the app is within the channel, and errors out if said user is not within the channel when utilizing this userid. According to the api docs, the requirement is that : " this API can only be used on behalf of a user who is assigned with a role that has the View or Edit permission for Chat Channels ."
If the user is added into the channel, then the apis return the correct results.
This has been tested with the owner of the account adding the app, which has the view/edit permissions on chat channels.
Error?
members api: No permission to access the channel members.
admins api: Unauthorized request. You do not have permission to list channel’s administrators on this user’s behalf.
Is this the intended behavior?
If a userid is used of another user that is within the channel, then the api returns successfully, but then how are we supposed to even get a user’s userid within a channel if we cant list the members of the channel beforehand?
Hi @wandrille
Thanks for reaching out to us!
I am currently looking into this issue.
I am able to replicate this behavior and my end.
So if I try to get chat channels using an Account Level Oauth-App that belongs to a user who is a member of the account, I get the same errors that you are listing.
I will continue documenting this issue and looking into it and will bring you an update as soon as I have one.
Cheers,
Elisa
I mean it’s the exact issue that the original poster had. I can only list channel members of public channels, but not that of private or company channels. As the admin account, I would expect that I would be able to list the members of any chat channel. I am able to pull all of the chats, but not members (which seems much more sensitive than just channel membership)
Thanks for the clarification @trent.tamura
I was actually able to track this issue down and it looks like this is expected.
The workaround for this issue would be using an user level oauth app
So essentially that User Level OAuth App would have to be a member of every single Channel in order to list the members right? Or would only be able to list members in the channels that user level app is a part of.