# Signature is invalid when starting the meeting

**URL:** <https://devforum.zoom.us/t/signature-is-invalid-when-starting-the-meeting/132852>\
**Category:** Meetings\
**Created:** [May 16, 2025, 3:08pm UTC](https://devforum.zoom.us/t/signature-is-invalid-when-starting-the-meeting/132852 "2025-05-16T15:08:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![loku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/loku/32/69183_2.png) [@loku](https://devforum.zoom.us/u/loku)\
**Post date:** [May 16, 2025, 3:08pm UTC](https://devforum.zoom.us/t/signature-is-invalid-when-starting-the-meeting/132852/1 "2025-05-16T15:08:44Z")

</div>

What am i doing wrong here. Shows me Signature is invalid when try to start the meeting,

// Method to generate a JWT signature for Zoom Meeting  
public String generateJWT(String meetingNumber, String role) {  
long iat = System.currentTimeMillis() / 1000 - 30; // Current time in seconds minus 30 seconds for iat  
long exp = (iat + 60 \* 60); // Expiration time for JWT (1 hour)  
long tokenExp = exp + 60 \* 60; // Token expiration time (1 hour)

```
// Construct the payload for the JWT
String payload = String.format("{"
        + "\"appKey\": \"%s\","
        + "\"mn\": \"%s\","
        + "\"role\": \"%s\","
        + "\"iat\": %d,"
        + "\"exp\": %d,"
        + "\"tokenExp\": %d"
        + "}", clientId, meetingNumber, role, iat, exp, tokenExp);

// Generate the JWT signature using HMAC SHA256
return HmacSHA256(payload, clientSecret);

```

}

```
// Method to generate the JWT signature using HMAC SHA256
private String HmacSHA256(String payload, String key) {
    try {
        Mac sha256_HMAC = Mac.getInstance("HmacSHA256");
        SecretKeySpec secret_key = new SecretKeySpec(key.getBytes(), "HmacSHA256");
        sha256_HMAC.init(secret_key);

        byte[] bytes = sha256_HMAC.doFinal(payload.getBytes());

        return Base64.getEncoder().encodeToString(bytes);
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}

```

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [May 19, 2025, 2:32pm UTC](https://devforum.zoom.us/t/signature-is-invalid-when-starting-the-meeting/132852/2 "2025-05-19T14:32:11Z")

</div>

Hey @loku  
Thanks for reaching out to us. Have you been able to troubleshoot this on your end?  
If not, please take a minute to review this blog

> **[Troubleshooting Meeting SDK signature validation](https://developers.zoom.us/blog/troubleshooting-meeting-sdk-signature-validation/)**
>
> placeholder description
