Zoom Apps Configuration
using python3, authenticating using Server-to-Server OAuth
Description
How do I add the scopes for: blah://developers.zoom.us/docs/api/rest/reference/chat/methods/#operation/listUserLevelChannelMembers
- I have added granular scope ‘team_chat:read_list_members:admin’.
- granular scope ‘team_chat:read:list_members’ is not available
- I have also tried adding all of the scopes
- other endpoints work such as, listing users and listing user channels
What I’m Trying To Solve
Get all channels created by a specific user and then get all of the messages from users within each channel.
Error
[2024-08-28 11:27:42,437] ERROR:test.zoom:Failed to list channel members. Status Code: 400, Message: {“code”:4711,“message”:“Invalid access token, does not contain scopes:[team_chat:read:list_members].”}
Troubleshooting Routes
Tried adding more scopes
How To Reproduce
Use Server-to-Server OAuth and try to list members of a chat channel
1 Like
Hi @sam.gardiner.ni
Thanks for reaching out to us and welcome to our Zoom Developer Community!
Allow me some time to troubleshoot this on my end and will get back to you with and update.
Cheers,
Elisa
Hi Elisa, thank you. Hopefully we get a reply soon.
1 Like
Hi @elisa.zoom - is there any update yet. Thank you
1 Like
A colleague and I are also seeing a similar issue. We are trying to get all channels, and to receive details of those channels.
When querying /chat/channels/{channel_id} as our Server-to-Server OAuth app, we receive the below:
"code": 4711,
"message": "Invalid access token, does not contain scopes:[team_chat:read:channel]."
This occurs both in Python3 and PowerShell7. Our app has the following scopes:
- team_chat:read:archive_channels:admin
- team_chat:read:channel:admin
- team_chat:read:list_channels:admin
- team_chat:read:list_user_channels:admin
- team_chat:read:user_channel:admin
Not sure if this is related but we also only receive public channels when querying /chat/channels/.
@elisa.zoom Any help would be greatly appreciated!
Hi @matt.eisenberg and @sam.gardiner.ni
thanks for your patience while we work on this issue.
Our Engineering team has identified this on our end and we are working on a fix.
I am waiting to hear back from the team with an estimated timeline for the release of this fix.
1 Like
Thanks for confirming Elisa! Just to clarify, is private channels missing from /chat/channels/ responses related to this issue?
Hi @matt.eisenberg
I am still waiting to hear back from our Team with the estimated timeline for this!
About the last question you asked, can you share more details about this issue? Or do you know if there is an existing thread that I can take a look at?
Hey @matt.eisenberg @sam.gardiner.ni
I have found another endpoint that you can use while we work on this issue
This endpoint will allow you to user the Server to Server aoauth app to get a list of channel members
Hey Elisa, there is no other thread that I am aware of –
When querying against GET /chat/channels/, we receive only our public channels, 9% of all channels. No private channels are returned.
The call:
$Query = "https://api.zoom.us/v2/chat/channels/"
$Body = @{
page_size = $PageSize
next_page_token = $NextPageToken
}
I am wondering if the issue identified by the devs earlier in this thread may also relate to our inability to retrieve private channels?
For the record, the public channels that do return from the above command cannot be queried against later. via /chat/channels/{channel_id}:
"code": 4711,
"message": "Invalid access token, does not contain scopes:[team_chat:read:channel]."
Hey Elisa, curious if the dev team has been able to look into the above? We’re still unable to retrieve private channels from the api.
Hey @matt.eisenberg
It looks like the endpoint you are calling
Get/chat/channels, lists account’s public channels only, so it is expected that you are not getting private channels with this endpoint.
Good point, thanks for confirming private channel population is not related.
It still leaves the question why GET /chat/channels/{channel_id} returns the same error above when querying a public channel. I receive the error with PATCH /chat/channels/events as well.
Is there somethin wrong with [team_chat:read:channel:admin] not filling in for endpoints that require [team_chat:read:channel]?
Hi @matt.eisenberg
So for the Get/ chat/channels/channel_id endpoint, you should be adding the scope team_chat:read:user_channel:admin , I just tested it and it does return the data, I will make a note to our Docs team so they update this endpoint.
And for the Patch /chat/channels/events you should be adding the scope team_chat:update:archive_channels:admin
Hey Elisa, happy Friday and thank you for the reply!
What is strange is that my app does have this permission. Below are all attached scopes containing the string “channel”
PS C:\Path > ($Tokenraw.content | ConvertFrom-Json).Scope.split(" ") | Where {$_ -like "`*channel`*"} | sort
team_chat:read:archive_channels:admin
team_chat:read:channel:admin
team_chat:read:list_channels:admin
team_chat:read:list_user_channels:admin
team_chat:read:user_channel:admin
team_chat:update:user_channel:admin
team_chat:write:search_channels:admin
team_chat:write:user_channel:admin
For PATCH /chat/channels/events, team_chat:update:archive_channels:admin is not avaialble in the list of scopes in the App management panel:
Interesting, so for right now the only endpoint you can not access is the Patch /chat/channels/events ???
I am wondering if this might be an issue with your account, meaning that we might need to have support enabling archiving in your account.
Let me look internally for more info
1 Like
Heya Elisa, just checking in. Did you find anything internally?
Hi Mat! @matt.eisenberg
I have not but I sent you a DM to follow up with more details