# Unable to join meeting. signature invalid

**URL:** <https://devforum.zoom.us/t/unable-to-join-meeting-signature-invalid/113567>\
**Category:** Meetings\
**Tags:** api\
**Created:** [July 13, 2024, 4:56am UTC](https://devforum.zoom.us/t/unable-to-join-meeting-signature-invalid/113567 "2024-07-13T04:56:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jainpdc](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jainpdc](https://devforum.zoom.us/u/jainpdc)\
**Post date:** [July 13, 2024, 4:56am UTC](https://devforum.zoom.us/t/unable-to-join-meeting-signature-invalid/113567/1 "2024-07-13T04:56:38Z")

</div>

Dear Team,

I am trying to join a meeting with the javascript example. I have generated the signature using JWT as suggested, but am getting the signature invalid issue.  
Please find below the tracking id.  
X-Zm-Trackingid: v=2.0;clid=us05;rid=WEB\_1e084a21e86e163306eedbf14fbf78f1

Thanks

---

<div class="post-metadata">

**Author:** ![fernandezxavi49](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/fernandezxavi49/32/61318_2.png) [@fernandezxavi49](https://devforum.zoom.us/u/fernandezxavi49)\
**Post date:** [July 13, 2024, 7:49am UTC](https://devforum.zoom.us/t/unable-to-join-meeting-signature-invalid/113567/2 "2024-07-13T07:49:36Z")

</div>

> [@jainpdc](#):
>
> I am trying to join a meeting with the javascript example. I have generated the signature using JWT as suggested, but am getting the signature invalid issue.  
> Please find below the tracking id.  
> X-Zm-Trackingid: v=2.0;clid=us05;rid=WEB\_1e084a21e86e163306eedbf14fbf78f1

Verify that you are using the correct API Key and Secret.  
Ensure your JWT payload includes the correct fields: `meetingNumber`, `role`, `iat`, `exp`, `appKey`, `tokenExp`.  
Make sure the `iat` (issued at) and `exp` (expiration) times are correctly set and synchronized with the server’s time.

---

<div class="post-metadata">

**Author:** ![jainpdc](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jainpdc](https://devforum.zoom.us/u/jainpdc)\
**Post date:** [July 13, 2024, 10:30am UTC](https://devforum.zoom.us/t/unable-to-join-meeting-signature-invalid/113567/3 "2024-07-13T10:30:52Z")

</div>

Hi Xavi,

Thank you for the response. Following is my code to generate the signature. I have verified all these are correct and also checked the signature

use \Firebase\JWT\JWT;

$key = [Client Secret]  
$iat = time() - 4000; //Just to make sure this is in the past  
$exptime = $iat + 17200 ;

$payload = [  
‘sdkKey’ =\> ‘[Client ID]’,  
‘appKey’ =\> ‘[Client ID]’,  
‘mn’ =\> ‘[meeting number]’,  
‘role’ =\> 0,  
‘iat’ =\> $iat,  
‘exp’ =\> $exptime,  
‘tokenExp’ =\> $exptime,  
];  
$signature = JWT::encode($payload, $key, ‘HS256’);
