Access Token not working for get attendee list from webinar

Access token is not working for get attendee list from past webinar.

it is working for create a new webinar.

Error
{“code”:124,“message”:“Invalid access token.”}

**Which App Type : OAuth

I am trying to call this api
https://marketplace.zoom.us/docs/api-reference/zoom-api/dashboards/dashboardwebinarparticipants

I am not able to set this scopes: dashboard:read:admin

Please let me know , how to set this above scope if problem
in scope.

Thanks

Hey @jkrugger,

You need to have a Business or higher plan to set the dashboard scopes.

From the docs:

“Business, Education or API Plan with Webinar add-on.”

If you only have the pro plan, and don’t want to upgrade, you can use the Get Webinar Participants Reports endpoint.

Thanks,
Tommy

Using the API, we are able to create a webinar and add a registrant using the token but we are having a problem using the same token to update a webinar or delete a webinar.

We were using the code below to try to update the webinar but are receiving a message: “code”:124,“message”:“Invalid access token.”

Please see the code below. We are close to wrapping this up and hopefully, you can help us figure these few things out.

        $postdata = '{"topic":"this is new course title","type":5,"start_time":"2020-06-23T15:00:00Z","duration":60,"timezone":"America\/New_York","agenda":"this is new course title","recurrence":{"type":1,"repeat_interval":1,"end_date_time":"2020-06-23T16:00:00Z"},"settings":{"host_video":"true","panelists_video":"true","practice_session":"true","hd_video":"true","approval_type":0,"registration_type":1,"audio":"both","auto_recording":"none","enforce_login":"false","enforce_login_domains":"","alternative_hosts":"","close_registration":"true","show_share_button":"true","allow_multiple_devices":"false","registrants_email_notification":"false"}}';

$header = array(
	'Content-Type: application/json',
	"Authorization: Bearer eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiI2OWM5OTk5MC1mODY2LTQ0ZmYtYWRlOS03MGJkNWYzYzZkNzkifQ.eyJ2ZXIiOiI2IiwiY2xpZW50SWQiOiJfcDBYQWhWblRpMmc0b04yYWlIR3lRIiwiY29kZSI6ImhLUDhOYVdiNEdfbVlyRld1d0RUeXVoWVpLakQ0RlI1QSIsImlzcyI6InVybjp6b29tOmNvbm5lY3Q6Y2xpZW50aWQ6X3AwWEFoVm5UaTJnNG9OMmFpSEd5USIsImF1dGhlbnRpY2F0aW9uSWQiOiIxNjhkYTg0Y2MwYjhhNTc3NzFiOTAxNDFhZjEyZTk3ZiIsInVzZXJJZCI6Im1ZckZXdXdEVHl1aFlaS2pENEZSNUEiLCJncm91cE51bWJlciI6MCwiYXVkIjoiaHR0cHM6Ly9vYXV0aC56b29tLnVzIiwiYWNjb3VudElkIjoick1vMEh2S3JRQkNza3lQSGNOQlEyZyIsIm5iZiI6MTU4NTg0NjIxOCwiZXhwIjoxNTg1ODQ5ODE4LCJ0b2tlblR5cGUiOiJhY2Nlc3NfdG9rZW4iLCJpYXQiOjE1ODU4NDYyMTgsImp0aSI6IjE1OGVlMjlmLTE3MjItNDAyYi1hODdiLTAzMzQxNDkzODNkMyIsInRvbGVyYW5jZUlkIjowfQ.azpqyF3hSjzQzQCbVoswNm_E9kICXvylAulPObQW0W9u-MARlFdWya63FBSgK4X9AfbyGPNwbGyhxuk4H7TNvg",
);

 $api_url = "[https://api.zoom.us/v2/webinars/182314192](https://mailtrack.io/trace/link/34bed517d3aad45fcdc53915e955e97c1757deff?url=https%3A%2F%2Fapi.zoom.us%2Fv2%2Fwebinars%2F182314192&userId=285235&signature=a10fcce4a91dc900)";

$curl = curl_init();
curl_setopt_array($curl, array(
	CURLOPT_URL => $api_url,
	CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_POST => true,
	CURLOPT_POSTFIELDS => $postdata,
	CURLOPT_HTTPHEADER => $header
));
 $response = curl_exec($curl);

Thanks,

Jamie

Hey @jkrugger,

Your access_token is most likely expired. I looked and that access_token expired around noon pacific time.

Access_tokens only last 1 hour, can you make sure it is refreshed and try again?

Thanks,
Tommy

Hello Tommy,

I have found problem in script for update a webinar.

I have added this method for update webinar : CURLOPT_CUSTOMREQUEST => ‘PATCH’,
now it is working fine.

I have seen one problem with zoom api , it is returning null response on update a webinar
it should return response like a create a webinar. so that we can make sure webinar is updated.

Please check.
Thanks

Hello Tommy,

I am trying to get attendee list from this api which you suggested
https://marketplace.zoom.us/docs/api-reference/zoom-api/reports/reportwebinarparticipants

it is giving me error :
{“code”:4700,“message”:“Invalid access token, does not contain scopes: [report:read:admin, zms:report:read]”}

Please let me know , how to set above scopes using script because there is not option on website for add above scopes.

Thanks

Hello Tommy,

I have tried to set scope using script like below

$param[‘scope’] = “Oauth, report:read:admin, zms:report:read”;

it ask me for report:read:admin permission when try to connect with zoom
but access token not return above scopes

[scope] => meeting:read meeting:write pac:read pac:write phone:read phone:write recording:read recording:write tsp:read tsp:write user:read user:write user_profile webinar:read webinar:write

Please check.

Thanks

Tommy,

We have been able to get everything working with the API except getting attendee data.

For this API function:

https://marketplace.zoom.us/docs/api-reference/zoom-api/reports/reportwebinarparticipants

it is returning error :

{“code”:4700,“message”:“Invalid access token, does not contain scopes: [report:read:admin, zms:report:read]”}

We are using a PRO account. We have many users that will be integrating with our app and they will all have PRO accounts with the Webinar option.

Our company provides Continuing Education Credits so we need to verify the attendance for each webinar. Can you please tell us how to get past this error message we are getting?

Thanks,

Jamie

Hey @jkrugger,

The Update Webinar endpoint does not have a response body. You can check if it worked via the response code of 204.

To use the report endpoints, make sure you are on a Pro or above Zoom plan, then the scopes will appear in your apps settings on the marketplace.

Do you have the scope selected in your app marketplace settings? Please send a screenshot so I can verify.

Thanks,
Tommy

Adding to @tommy good suggestions above.
If you add those new scopes, you will need to re-authorize the app, so your access token picks up those changes.

Hello Support Team

I have new app with account level.

I have reauthorized it and it is returning scopes :

[scope] => account:master account:read:admin account:write:admin billing:master contact:read:admin dashboard:master dashboard_crc:read:admin dashboard_home:read:admin dashboard_im:read:admin dashboard_meetings:read:admin dashboard_webinars:read:admin dashboard_zr:read:admin group:master group:read:admin group:write:admin h323:read:admin h323:write:admin meeting:master meeting:read:admin meeting:write:admin recording:master recording:read:admin recording:write:admin user:master user:read:admin user:write:admin webinar:master webinar:read:admin webinar:write:admin

but I am still not able to get attendee list.

Here is error :
{“code”:4700,“message”:“Invalid access token, does not contain scopes: [report:read:admin, zms:report:read]”}

here is code which I am using for get attendee list :

$api_url = "https://api.zoom.us/v2/report/webinars/ffyrI9ZYQOmaq9BBWVIACA==/participants";

$header = array(
“Authorization: Bearer ]”
);

$curl = curl_init();
curl_setopt_array($curl, array(
	CURLOPT_URL => $api_url,
	CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_CUSTOMREQUEST => 'GET',
	CURLOPT_HTTPHEADER => $header
));

 $response = curl_exec($curl);

Please check and let me know what I am doing wrong.

Please check attachment for scope enabled.

Thanks

Hey @jkrugger,

You do not have the report scopes. In order to call the report endpoints as stated in the docs, you need the report:read:admin scope.

Please see this article to get access to reports:

Thanks,
Tommy

Hello Tommy

I am trying to get this scope using script: report:read:admin

I am passing this scope request :
$param[‘scope’] = “Oauth, report:read:admin, zms:report:read”;

it is not returning above scope in return response

[scope] => account:master account:read:admin account:write:admin billing:master contact:read:admin dashboard:master dashboard_crc:read:admin dashboard_home:read:admin dashboard_im:read:admin dashboard_meetings:read:admin dashboard_webinars:read:admin dashboard_zr:read:admin group:master group:read:admin group:write:admin h323:read:admin h323:write:admin meeting:master meeting:read:admin meeting:write:admin recording:master recording:read:admin recording:write:admin user:master user:read:admin user:write:admin webinar:master webinar:read:admin webinar:write:admin

Please check.
Thanks

Hey @jkrugger,

Are you able to choose that scope in the Zoom App Marketplace settings for your App? It needs to be selected there, and I did not see it in your screenshots.

Here are the prereqs for the reports feature:

Thanks,
Tommy

Hello Tommy,

Thanks for your help. Now it is working fine. I am able to get attendee list.

Thanks

1 Like

Hey @jkrugger, happy to hear you got it working! :slight_smile:

Thanks,
Tommy