How to use RestAPI to add panelist to my webinar?

Hi, I am new to Zoom. I have a website where I am selling live guitar lessons to be hosted via Zoom. I am having people purchase the lessons via Stripe Checkout on my site and then on my site I have webhook set up in response to a successful Stripe Charge.

Now, in that same Webhook, I want to take action with Zoom, such as adding the person as a panelist.

The RestAPI documentation is not entirely clear to me as it wants me to use OAuth in order to use the RestAPI. Since I am the owner of my Zoom account, I am trying to avoid an overly complicated integration. In fact, I wouldn’t call what I am doing an ‘App’ so I am hoping there is a way around the whole OAuth app process, where I could integrate with Zoom similar to how I am with Stripe - that is, directly via the API.

Any tips on how I can do what I need to do in the simplest way? I am using Laravel 5.3 for what it is worth.

Thanks,
Brian

Hey @huetherb, thanks for reaching out and using Zoom!

For your use case, I would suggest using the JWT App Type as it does not require OAuth. By creating a JWT App Type, you will get a client id and client secret which you can use to create a JWT token to call the Zoom API’s.

You can also generate a JWT token on the App Dashboard to easily test it out,

Then in your request header,

{
   "Authorization": "Bearer { JWT TOKEN HERE }"
}

Let me know if this helps!

Thanks,
Tommy

Hi, thanks for the info. On the JWT reference pages I see these sorts of examples:

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 39ug3j309t8unvmlmslmlkfw853u8",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Curious if I should follow that approach or specify “Authorization”: “Basic { JWT TOKEN HERE }”?

thanks,
Brian

Hey @huetherb,

Forgive me it is Bearer NOT Basic.

Yes you can follow that approach.

CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 39ug3j309t8unvmlmslmlkfw853u8",
    "content-type: application/json"
  ),

Is the same as

 {
   "Authorization": "Bearer { JWT TOKEN HERE }"
}

Thanks,
Tommy

Thanks again. I think I am almost there. One question about userid. Since I am the zoom account holder, if I want to list all my webinars that I have created, what do I use for my userid in that case? Or am I thinking about it incorrectly and maybe I need to use an account id?

thanks, Brian

Ok, so I got my userid after doing API call to get all user info. I am starting to wonder about a few things. Here is what I am trying to do and maybe you have some ideas on how to properly do this?

  • I am marketing live guitar lessons that are packed into a webinar series. So for instance 12 webinars covering some topic. Someone can buy one or all.
  • I created the webinar ‘products’ in Stripe. So in Stripe I have products Webinar1, Webinar2, WebinarSeries (which is all webinars for the course).
  • On my site I am using Stripe Checkout to handle payment of webinars or a webinar series.
  • This forces me to use a webhook from Stripe to then perform Zoom actions. So I need a mechanism to query my Zoom webinars. For instance, in Stripe, if I name a webinar product Webinar1, then is there a way to perform the action “add user with some name and email to the webinar named Webinar1” or in case of a series to perform action “add user with some name and email to the webinars named Webinar1, Webinar2, Webinar3”

Trying to figure out an efficient way to do this and maybe even Zapier can function as I need, but before I try Zapier I am trying to see how deeply the RestAPI lets me do the kind of actions I need.

thanks!
Brian

1 Like

Hey @huetherb,

You can use the me context or your user email in place of the userID for GET /users/{userId}/webinars

Cool use case! There are a few ways to accomplish what you want:

  1. Create the webinar/s first, and use the webinarID as the stripe product name. That way after you get the stripe webhook, you can add that user as an attendee to the respective webinar (which sends them an invite email with the link to join).

    To manage registering users for Webinar1, Webinar2… and WebinarSeries you could utilize the occurrence_id query param to specify which webinars in a series they have access to. So in Stripe as the product names you would have: webinarID-occurrenceID for a single webinar and webinarID-All for Webinar Series so your code knows which webinars to add the registrants to after you get the webhook.

OR

  1. You can use the PayPal Webinar feature without any coding required.

https://support.zoom.us/hc/en-us/articles/360018597111-Configuring-Zoom-Webinars-with-PayPal

Let me know if you have any other questions!

Thanks,
Tommy

Hi again! With occurrence_id, do you mean treating that in Stripe side of things? Or is that a query param to use in Zoom? I hadn’t read about using those sorts of query params yet, but am new to all this!

Yeah, I think my use case is indeed interesting and I also think it might be where things are heading. If you think about ecommerce in general, then the idea of categorization becomes paramount. Packing things together. So you have that plus the trends of online teaching where sites like udemy are using video based courses. I really think zoom can launch way ahead of the pack by adding functionality to package webinars together, instead of treating each webinar as a single entity with no relationships.

So you have all these things going for you 1) the categorization nature of ecommerce, 2) the current trend of online teaching of multipart courses, and 3) the overall explosion in video consumption.

If Zoom started to add these sorts of organizational capabilities I think you would be the first webinar provider to do so and therefore it would mark the start of convergence of webinar and teaching platforms.

Just a thought!

Thanks again

1 Like

Hey @huetherb,

I mean creating the webinars in Zoom, and using the Webinars webinarID plus the occurrenceID to name the “products” in Stripe so you can identify which webinar the user purchased on stripe when you get the stripe webhook.

So say I create a recurring webinar that has 3 occurrences (or in your case a series of lessons). The webinarID is 231442124 and the 3 occurrenceIDs are 1, 2, and 3.

You could create 4 stripe “products”:

231442124 for WebinarSeries,
231442124-1 for Webinar1,
231442124-2 for Webinar2,
231442124-3 for Webinar3.

After the user purchases the lesson on stripe, you will receive the “product” name in the webhook. Then you can use the “product” name and call the POST /webinars/{webinarId}/registrants endpoint, passing in the webinarID (derived from the stripe “product name”) and the occurrence_id query param (derived from the stripe “product name”) which sends an invite email and will allow the user to attend the webinar.

For example this will give the user access to the first occurrence of the webinar (Lesson 1).
https://api.zoom.us/v2/webinars/231442124/registrants?occurrence_ids=1

Also, thanks for sharing! That is the beauty of the Zoom App Marketplace - to integrate with other services and companies to build amazing things!

Hi, ok you are talking about recurring webinars. The thing is, I had spoken with Zoom support about recurring webinars and how each recurrence will have the same name. So if I have 3 distinct webinar topics but tried to bundle them as a 3 recurrent webinar, in the notification emails the users would see the same webinar name.

Stripe allows metadata and attributes so I think in principle I can set products to contain a lot of detail but it would still be great if Zoom allowed you to organize on the basis of parent and children. Basically what I am doing is abstracting in a way to get Zoom to behave to the user how I need but it amounts to some trickery :slight_smile:

regards, Brian

1 Like

I see! Yeah you could just create separate webinars then! :slight_smile:

Have you tried the PayPal Webinars feature? It may have the Parent - Children organization you need.

Thanks,
Tommy

Hi, I don’t think that will enable the structure I am looking for and I think Stripe will be better option. thanks, Brian

Okay thanks! Best of luck with the stripe integration!

-Tommy