# Zoom Meeting SDK authentication

**URL:** <https://devforum.zoom.us/t/zoom-meeting-sdk-authentication/104770>\
**Category:** Meeting SDK\
**Created:** [February 29, 2024, 1:41pm UTC](https://devforum.zoom.us/t/zoom-meeting-sdk-authentication/104770 "2024-02-29T13:41:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kinan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kinan/32/52663_2.png) [@Kinan](https://devforum.zoom.us/u/Kinan)\
**Post date:** [February 29, 2024, 1:41pm UTC](https://devforum.zoom.us/t/zoom-meeting-sdk-authentication/104770/1 "2024-02-29T13:41:41Z")

</div>

I am trying to integrate Zoom meeting SDK into a Wordpress website, I setup this auth endpoint on the server: [GitHub - zoom/meetingsdk-auth-endpoint-sample: Generate a Meeting SDK JWT to join Zoom meetings and webinars with the Meeting SDK.](https://github.com/zoom/meetingsdk-auth-endpoint-sample), and everything is working as expected, the question is: is there any alternative auth endpoint built with PHP or any documentation for integrating the auth API with any programming language?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [March 5, 2024, 5:20am UTC](https://devforum.zoom.us/t/zoom-meeting-sdk-authentication/104770/2 "2024-03-05T05:20:18Z")

</div>

@Kinan ,

if you want to code this in PHP, you could do something like this

```auto
<?php

$config = include 'config.php';
$meetingSDKClientKey = $config['meetingSDKClientKey'];
$meetingSDKClientSecret = $config['meetingSDKClientSecret'];

$iat = time() - 30;
$exp = $iat + 60 * 60 * 10;
//$client_request = $this->request->input('json_decode');

// Define the payload data for your JWT token
$token_payload = [
    'sdkKey' => $meetingSDKClientKey,
    'mn' => 9898533313,
    'role' => 1,
    'iat' => $iat, // Issued at timestamp
    'exp' => $exp, // Expiration timestamp (2 hours from now)
    'appKey' => $meetingSDKClientKey,
    'tokenExp' => $exp 
];

// Encode the JWT token
$header = json_encode(['typ' => 'JWT', 'alg' => 'HS256']);
$payload = json_encode($token_payload);

$headers_encoded = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($header));
$payload_encoded = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($payload));

$signature = hash_hmac('sha256', $headers_encoded . '.' . $payload_encoded, $meetingSDKClientSecret, true);
$signature_encoded = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($signature));

$jwt = $headers_encoded . '.' . $payload_encoded . '.' . $signature_encoded;

echo $jwt;

?>

```
