paint-brush
How to Create Zoom Meeting URLs on Your Website by@kanchansonwani
648 reads
648 reads

How to Create Zoom Meeting URLs on Your Website

by kanchan sonwaniOctober 4th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I recently came across a project where I needed to develop a platform where users can take live sessions via Zoom Meetings. These are the steps you can follow to create a Zoom Meeting URL and join a meeting from your website.
featured image - How to Create Zoom Meeting URLs on Your Website
kanchan sonwani HackerNoon profile picture

I recently came across a project where I needed to develop a platform where users can purchase and take live sessions via the Zoom App.


So I went through Zoom’s official documents and found a lot of APIs provided by the Zoom App.


I took a few steps from there and I searched a few steps on the internet. These are the steps you can follow to create a Zoom Meeting URL and join a meeting from your website browser.


  1. Create an App from the Zoom marketplace:

    1. First, you need to create a Zoom profile from . Once you finish that, you need to build an app from this URL . Go to that URL, see the “Develop” Menu on top and then click on “Build” from the dropdown.

    2. Next, you need to choose “Server-to-Server OAuth“ and then click the Create button.

    3. Once done, follow the steps one by one. In that step, you must also choose Scope, Which is very important. To be able to create a Zoom Meeting URL, you must choose a few scopes that are required to use Meeting API.

      1. these are the scopes you need to choose:

        1. “View and manage account info”
        2. “View and manage sub account's user meetings”
        3. “View and manage all user meetings”
    4. once you complete all the steps to build “server to server OAuth”. you need to get an access token.

  2. Access Token

    1. you need to have an access token which will be used later in Creating the meeting URL.

    2. so you will need the account ID, client ID, and client secret and use them to get an access token.

      1. you need to call this Zoom API <your_account_id>

        1. you will get <account_id> from the “server-to-server-oauth” app you built in previous step. go to <//marketplace.zoom.us/ > and find the “manage” menu on top and once you click it, you’ll get all the apps you have created. so find your created app there and once you go inside that, you can see the app credential option there. under that, you will get the necessary keys. remember this because we will use the client ID and client secret to get the access token.
        2. OK now you have the account id, I am using Postman to create an access token, You need to call this API using any programming language. you need to create this token every time you make a Meeting URL. Because it gets expired. so in the Postman App, call that API with the POST method and choose Basic Authorization, where you need to use the client ID as the user ID and the client secret as the password in Postman.
        3. that is it. once you hit the API, you will get an access token in response.
  3. so now you have built the app and got an access token for it. Now we will use this to create a meeting URL.

  4. that API URL, we need to access the token and use the POST method along with the required data (you can find them in Zoom doc). See the example below. I have used PHP and curl


    1. $data = array();
      $data['topic'] 		= 'Example Test Meeting';
      $data['start_date'] = date("Y-m-d h:i:s", strtotime('tomorrow'));
      $data['duration'] 	= 30;
      $data['type'] 		= 2;
      $data['password'] 	= "12345";
      
      


      $access_token = "<Your_generated_access_token>";
      $request_url = "//api.zoom.us/v2/users/[email protected]/meetings";
      		
      		$headers = array(
      			"authorization: Bearer ".$access_token,
      			"content-type: application/json",
      			"Accept: application/json",
      		);
      		
      		$postFields = json_encode($data);
      		
              	$ch = curl_init();
              	curl_setopt_array($ch, array(
                  	CURLOPT_URL => $request_url,
      	    	CURLOPT_RETURNTRANSFER => true,
      	    	CURLOPT_ENCODING => "",
      	    	CURLOPT_MAXREDIRS => 10,
      	    	CURLOPT_TIMEOUT => 30,
      	    	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      	    	CURLOPT_CUSTOMREQUEST => "POST",
      	    	CURLOPT_POSTFIELDS => $postFields,
      	    	CURLOPT_HTTPHEADER => $headers,
              	));
      
              	$response = curl_exec($ch);
              	$err = curl_error($ch);
              	curl_close($ch);$request_url = "//api.zoom.us/v2/users/[email protected]/meetings";
      		
      		$headers = array(
      			"authorization: Bearer ".$this->access_token,
      			"content-type: application/json",
      			"Accept: application/json",
      		);
      		
      		$postFields = json_encode($data);
      		
              	$ch = curl_init();
              	curl_setopt_array($ch, array(
                  	CURLOPT_URL => $request_url,
      	    	CURLOPT_RETURNTRANSFER => true,
      	    	CURLOPT_ENCODING => "",
      	    	CURLOPT_MAXREDIRS => 10,
      	    	CURLOPT_TIMEOUT => 30,
      	    	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      	    	CURLOPT_CUSTOMREQUEST => "POST",
      	    	CURLOPT_POSTFIELDS => $postFields,
      	    	CURLOPT_HTTPHEADER => $headers,
              	));
      
              	$response = curl_exec($ch);
              	$err = curl_error($ch);
              	curl_close($ch);
      
      echo json_decode($response);
      
      
        
      


That’s it. Have a great time coding.

바카라사이트 바카라사이트 온라인바카라