# Ajax call to Api

**URL:** <https://devforum.zoom.us/t/ajax-call-to-api/93309>\
**Category:** Webinars\
**Tags:** api\
**Created:** [August 12, 2023, 10:15pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309 "2023-08-12T22:15:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![c.egeolu](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@c.egeolu](https://devforum.zoom.us/u/c.egeolu)\
**Post date:** [August 12, 2023, 10:15pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/1 "2023-08-12T22:15:37Z")

</div>

i am making an ajax call to [https://api.zoom.us/v2/webinars/111/panelists](https://api.zoom.us/v2/webinars/111/panelists) but i am receiving CORS errors (has been blocked by CORS policy: Response to preflight request doesn’t pass access control check)

I am using Zoom Web SDK

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 14, 2023, 6:50pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/2 "2023-08-14T18:50:14Z")

</div>

Hi @c.egeolu  
Thanks for reaching out to us!  
Have you been able to troubleshoot this on your end?

---

<div class="post-metadata">

**Author:** ![egeoluchinedu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/egeoluchinedu/32/50113_2.png) [@egeoluchinedu](https://devforum.zoom.us/u/egeoluchinedu)\
**Post date:** [August 14, 2023, 8:54pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/3 "2023-08-14T20:54:06Z")

</div>

I have tried all I could but to no avail.

My intention was to remove a user from panelists via the api

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 14, 2023, 9:50pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/4 "2023-08-14T21:50:35Z")

</div>

Hi @egeoluchinedu welcome to our community!  
Can you confirm if you are using this endpoint:

> **[Zoom Meeting API](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/webinarPanelistsDelete)**
>
> API Reference for /docs/api/rest/reference/zoom-api/methods

Also, make sure that the webinar ID is correct please

---

<div class="post-metadata">

**Author:** ![c.egeolu](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@c.egeolu](https://devforum.zoom.us/u/c.egeolu)\
**Post date:** [August 14, 2023, 9:54pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/5 "2023-08-14T21:54:41Z")

</div>

Dear Elisa,

Yes. So the plan was to remove an attendee that was upgraded to a panelist.

Each time the attendee wants to rejoin after leaving the meeting from zoom web sdk, he always receives “Please provide a valid TK” error message.

So I was thinking removing the registered email from the panelist will solve the problem

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 15, 2023, 2:18pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/6 "2023-08-15T14:18:48Z")

</div>

Ah I see… let me try to replicate this on my end.  
In the meantime, does your webinars has registration enabled? if so, maybe after removing the attendee from the panelist, mabye you can add it as a registrant so they can join the webinar?

---

<div class="post-metadata">

**Author:** ![c.egeolu](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@c.egeolu](https://devforum.zoom.us/u/c.egeolu)\
**Post date:** [August 15, 2023, 4:52pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/7 "2023-08-15T16:52:12Z")

</div>

The following are steps to replicate the scenario.

1. Attendee joins webinar via the zoom web SDK software from a preferred browser  
(e. g Google chrome or Edge)
2. Host upgrades the attendee to Panelist.
3. Attendee closes the browser he used to join the webinar
4. Attendee tries to rejoin the webinar again.
5. The error popup us “Please provide a valid TK parameter”

So, the question is:

1. How to generate the TK parameter and allow the attendee to rejoin the webinar via the Zoom Web SDK
2. How to remove the attendee as a panel list via Zoom API using jquery ajax call or [asp.net](http://asp.net) httprequest call

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 16, 2023, 4:38pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/8 "2023-08-16T16:38:40Z")

</div>

Hi @c.egeolu  
Thanks for sharing more details with me.  
I am not able to replicate this issue.  
When I did my testing, once I left the meeting I used the same join URL to join the meeting and did not get an error "Please provide a valid TK parameter’

You can remove the panelist via Zoom API using the following endpoint:

> **[Zoom Meeting API](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/webinarPanelistDelete)**
>
> API Reference for /docs/api/rest/reference/zoom-api/methods

---

<div class="post-metadata">

**Author:** ![c.egeolu](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@c.egeolu](https://devforum.zoom.us/u/c.egeolu)\
**Post date:** [August 16, 2023, 6:48pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/9 "2023-08-16T18:48:41Z")

</div>

The issue is on Webinar.

Attendees can leave and join meeting without having the TK error.

But as soon as the attendee is added as a panelist, and leaves the meeting, he/she can not rejoin.

Try the simulation again by making your self an attendee and let the host make you a panelist.

Meanwhile, I tried the API and I got null, I guess I am not able to generate the correct Authorization token for the Bearer Header.

Can you also pls assist in guiding me how to generate the Bearer Token in the Header before passing via ajax.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 28, 2023, 5:08pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/10 "2023-08-28T17:08:20Z")

</div>

Hi @c.egeolu  
Sorry, I missed your response I did not get a notification on this  
I will go ahead and replicate this behavior again

---

<div class="post-metadata">

**Author:** ![egeoluchinedu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/egeoluchinedu/32/50113_2.png) [@egeoluchinedu](https://devforum.zoom.us/u/egeoluchinedu)\
**Post date:** [August 28, 2023, 5:35pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/11 "2023-08-28T17:35:07Z")

</div>

Thanks. The issue has not been resolved.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 31, 2023, 8:07pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/12 "2023-08-31T20:07:27Z")

</div>

I am not able to replicate this on my end.  
I tried making myself panelist and leaving the meeting and then joining back and had no issues.  
I am tagging a colleague to see if he can give us any suggestions @chunsiong.zoom

---

<div class="post-metadata">

**Author:** ![egeoluchinedu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/egeoluchinedu/32/50113_2.png) [@egeoluchinedu](https://devforum.zoom.us/u/egeoluchinedu)\
**Post date:** [September 4, 2023, 8:21pm UTC](https://devforum.zoom.us/t/ajax-call-to-api/93309/13 "2023-09-04T20:21:16Z")

</div>

Please share sample code on how to generate token for the header bearer during an Ajax call to zoom API to list panelist and also delete a user from panelist
