# Can someone please provide me PHP code for generating JWTKey

**URL:** <https://devforum.zoom.us/t/can-someone-please-provide-me-php-code-for-generating-jwtkey/12060>\
**Category:** API and Webhooks\
**Created:** [April 8, 2020, 5:35am UTC](https://devforum.zoom.us/t/can-someone-please-provide-me-php-code-for-generating-jwtkey/12060 "2020-04-08T05:35:00Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Dora\_Reddy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dora_reddy/32/21698_2.png) [@Dora\_Reddy](https://devforum.zoom.us/u/Dora_Reddy)\
**Post date:** [April 29, 2020, 4:25pm UTC](https://devforum.zoom.us/t/can-someone-please-provide-me-php-code-for-generating-jwtkey/12060/7 "2020-04-29T16:25:20Z")

</div>

@tommy Thanks for the reply. I looked into [https://jwt.io/](https://jwt.io/) but it had many libraries. I’m confused to pick the correct one suitable for my requirement.

In this post [Help with api create meeting with php](https://devforum.zoom.us/t/help-with-api-create-meeting-with-php/5189) @mike1 posted below code for generating JWT but it didn’t have full code like JWT::encode function. Looking for full working code  
//function to generate JWT  
private function generateJWTKey() {  
$key = $this-\>zoom\_api\_key;  
$secret = $this-\>zoom\_api\_secret;  
$token = array(  
“iss” =\> $key,  
“exp” =\> time() + 3600 //60 seconds as suggested  
);  
return JWT::encode( $token, $secret );  
}

---

_[View the full topic](https://devforum.zoom.us/t/can-someone-please-provide-me-php-code-for-generating-jwtkey/12060)._
