How to choose JWT or OAuth authentication for Zoom Meetings integration to My Website?

Hi, I am new to the zoom integration, and after going through the document of authentication methods I am still confused. So our company is trying to integrate zoom meetings to our website zoom API.

I have Used OAuth Authentication for getting access_token with grand_type as authorization_code. But for this, I need to get code instantly for each call. How can I obtain code for each API call ? Is there any portion i went wring

public function getBearerToken(){
$clientID=“YEKb5hW_T6mVzHd7wpxqw”;
$clientSecret="*******************";
$code=“F0z6nzgLCu_EmFIrUhBTpumQCipK9MXfA”;
$content = “grant_type=authorization_code&code=$code&redirect_uri=https://www.tutorsvalley.com/payment_success.php”;
$token_url=“https://zoom.us/oauth/token”;

    $curl = curl_init();
    $base64 = $clientID.":".$clientSecret;

    curl_setopt_array($curl, array(
        CURLOPT_URL => $token_url,
        CURLOPT_SSL_VERIFYPEER => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $content,
        CURLOPT_HTTPHEADER => array(
            "Authorization: Basic ".base64_encode($base64),
          ),
    ));
    $response = curl_exec($curl);
    curl_close($curl);
}

Thanks so much, and sorry for the messed up question. Hope this makes sense.

Regards,
Vidya Balakrishnan

Hey @vidya.webandcrafts, thanks for posting and using Zoom!

Is this integration for internal purposes only?

If so, you can use the JWT Token method of authentication if you don’t need to share the integration outside your Zoom account.

Here is the example usage:

GET https://api.zoom.us/v2/users

"Authorization": "Bearer JWT_TOKEN_HERE"

Let me know if that helps! :slight_smile:

Thanks,
Tommy

1 Like

Thanks for the help :slight_smile:

1 Like

You are welcome! :slight_smile:

-Tommy