missing scope in api call though scope is included | Community
Skip to main content
Newcomer
January 9, 2025
Question

missing scope in api call though scope is included

  • January 9, 2025
  • 2 replies
  • 7 views

trying to get data on meetings usage
from api https://api.zoom.us/v2/accounts/me/report/users/me/meetings
using power BI protyping in curl 
getting error {"code":4711,"message":"Invalid access token, does not contain scopes:[report:read:user:master]."}

but it is in the list of assigned scopes
What is wrong?

details

> curl -X POST https://zoom.us/oauth/token -d "grant_type=account_credentials" -d "account_id=Dlla_6qTQRS6cwToesZlEQ" -H "Authorization: Basic <<xxxx>>==" "https://zoom.us/oauth/authorize?response_type=code&client_id=d6tQxsZ8T66f0ShwS9CoNg&redirect_uri=https://oauth.powerbi.com/views/oauthredirect.html"
{"access_token":"<<yyy>>","token_type":"bearer","expires_in":3600,"scope":"user:read:list_users:admin user:read:user:admin user:read:pm_room:admin user:read:settings:admin user:read:summary:admin user:read:presence_status:admin user:read:personal_note:admin meeting:read:list_meetings:admin meeting:read:meeting:admin meeting:read:list_registrants:admin meeting:read:registrant:admin meeting:read:list_registration_questions:admin meeting:read:list_polls:admin meeting:read:poll:admin meeting:read:invitation:admin meeting:read:past_meeting:admin meeting:read:list_past_instances:admin meeting:read:list_past_participants:admin meeting:read:list_poll_results:admin meeting:read:survey:admin meeting:read:participant:admin meeting:read:participant_feedback:admin meeting:read:alert:admin meeting:read:device:admin meeting:read:chat_message:admin meeting:read:local_recording_token:admin account:read:sub_account:admin account:read:settings:admin account:read:account_setting:admin webinar:read:list_webinars:admin webinar:read:webinar:admin webinar:read:list_past_participants:admin zoom_events:read:list_hubs:admin zoom_events:read:list_hub_videos:admin report:read:list_users:admin report:read:billing_invoice:admin report:read:billing:admin report:read:cloud_recording:admin report:read:daily_usage:admin report:read:meeting:admin report:read:list_meeting_participants:admin report:read:list_meeting_polls:admin report:read:user:admin report:read:operation_logs:admin report:read:user_activities:admin report:read:upcoming_meetings_webinars:admin report:read:webinar:admin report:read:list_webinar_participants:admin report:read:list_webinar_polls:admin report:read:webinar_survey:admin report:read:meeting_activity_log:admin report:read:list_users:master report:read:cloud_recording:master report:read:daily_usage:master report:read:meeting:master report:read:user:master report:read:operation_logs:master report:read:list_webinar_participants:master report:read:meeting_survey:master report:read:meeting_activity_log:master team_chat:read:channel:admin team_chat:read:list_bookmarks:admin contact:read:list_contacts:admin device:read:command:admin cloud_recording:read:list_account_recordings:admin cloud_recording:read:list_user_recordings:admin cloud_recording:read:recording_analytics_details:admin cloud_recording:read:recording_analytics_summary:admin cloud_recording:read:recording_settings:admin cloud_recording:read:list_recording_registrants:admin cloud_recording:read:list_recording_files:admin cloud_recording:read:recording:admin cloud_recording:read:registrant:admin cloud_recording:read:archive_files:admin archiving:read:list_archived_files:admin archiving:read:archived_files:admin archiving:read:archived_file_statistics:admin archiving:read:archive_files:admin information_barrier:read:list_policies:admin information_barrier:read:policy:admin zoom_events:read:list_hub_hosts:admin","api_url":"https://api.zoom.us"}

>curl -X GET "https://api.zoom.us/v2/accounts/me/report/users/me/meetings" -H "Authorization: Bearer <<yyy>>"
{"code":4711,"message":"Invalid access token, does not contain scopes:[report:read:user:master]."}

 

2 replies

Community Champion | Employee
January 9, 2025

@joemcal - The "Master" scopes are only applicable if your application is running in a parent account with sub-accounts underneath it.  It can be confusing since you have applied the scope, but if the account doesn't have sub-accounts, it would not have those scopes available and therefore the API can't use them.  Can you verify if the account you loaded this to has sub-accounts?

joemcalAuthor
Newcomer
January 10, 2025

Sorry I've misunderstood what the difference between master and admin is.
The account doesn't have sub-accounts, I misunderstood and thought as its an admin account all other accounts were "sub-accounts": Oh dear back to the drawing board  😀
thanks for your help
basically i'm just trying to automate getting the stats from the 1st line of the dashboard
is there an api/apis  that does/do this?

Community Champion | Employee
January 10, 2025

@joemcal - Can you be a little more specific on what information you are referring to as "the first line of the dashboard"?  I have several tabs in my dashboard, and the first line is a header in most of them, so example data or specific information will help.

joemcalAuthor
Newcomer
January 13, 2025

thank you colegs

its the top line of the usage data tab

so its the 

1) overall user stats - actve users, newly registered and in total 

2) Meetings - total, meeting minutes and participants

6) Webinars - total, meeting minutes and  participants

7) Recorded storage - used and total storage allotment

 

my boss manually enters these each month into a spreadsheet

and i've been tasked with automatically doing this

 

thanks for your help in advance

Joe