Receiving error code while trying to list webinar participants in real time with OAuth in Python

Description
I’m trying to list webinar participants in real time from a webinar I scheduled and am currently hosting. To do this, I’m calling the metrics/webinars/{webinarId}/participants endpoint through the OAuth API in Python. I’ve successfully gone through the login/install process for my OAuth Marketplace app, and gotten my access token and tested that it works. I now need to call this endpoint (or, I need to find another way to do list webinar participants in real time, if this will not work).

Error
I get the following response from the Zoom v2 API:
{“code”:4700,“message”:“Invalid access token, does not contain scopes: [dashboard:read:admin, dashboard_webinars:read:admin].”}

Which App Type:
OAuth 2.0

Which Endpoint/s?
metrics/webinars/{webinarId}/participants

How To Reproduce (If applicable)
Run following MWE:

import requests
import json
baseurl = "https://api.zoom.us/v2/"
part = "metrics/webinars/{webinarId}/participants"
access_token = "xxxxxxxx"
wid = "123456789000"
headers = {'content-type': 'application/json', 'Authorization': "Bearer " + access_token}
r = requests.post(baseurl + part.format(webinarId=wid), headers=headers) 
data = json.loads(r.text)
print(data)

Additional context
My app has the scopes:

  • View your profile information/user_profileDelete
  • View your webinars/webinar:readDelete
  • View and manage your webinars/webinar:writeDelete

I assume the error is due to missing the “dashboard:read:admin” scope and “dashboard_webinars:read:admin” scopes. How do I add these? I don’t see them on the Scopes page in the Zoom App creation workflow at App Marketplace for my Marketplace OAuth app. Do I need additional permissions?

Thanks!

Hi @gz1 ,

Thanks for reaching out about this, and happy to help.

First, I should note that the GET Webinar Participants endpoint requires admin level scopes. In order to use admin-level scopes, you need to make sure you’re working with an Account-Level OAuth App. Based on the scopes you’re seeing available in your OAuth app, it sounds like you’re working with a user-level OAuth App instead of an account level app.

If you create an Account Level app, you should see these scopes available to resolve this issue.

Another option you might consider is our Webinar Participant Joined webhooks:

These don’t require an OAuth App with Account Level permissions. You could create a webhook only app to track attendees.

Let me know if this helps!

Best,
Will

Hi @will.zoom, thanks for the quick reply. Unfortunately my (sub?)account is part of a large university account, and I don’t think I’d be able to install an Account Level app under my current permissions. Trying to do so says that I’d need to ask my admin to install it. Would having “developer privileges” allow me to install it? I may be able to receive these privileges from our IT department.

If not, I’ll try the webhook method.

Thanks!

Hi @gz1,

Ah, I see—unfortunately this will require an admin to install. Developer privileges will not affect this.

Given this, I recommend leveraging our webhooks instead.

Thanks!
Will

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.