# Troubleshooting Meeting SDK signature validation

**URL:** <https://devforum.zoom.us/t/troubleshooting-meeting-sdk-signature-validation/85961>\
**Category:** Web\
**Tags:** guide, sdk, sdk-jwt\
**Created:** [April 3, 2023, 8:33pm UTC](https://devforum.zoom.us/t/troubleshooting-meeting-sdk-signature-validation/85961 "2023-04-03T20:33:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 3, 2023, 8:33pm UTC](https://devforum.zoom.us/t/troubleshooting-meeting-sdk-signature-validation/85961/1 "2023-04-03T20:33:49Z")

</div>

In this guide, we’ll cover common issues you may run into when generating a signature for the Zoom Meeting SDK.

The Zoom Meeting SDK uses a JSON Web Token (JWT) signature to authorize the SDK and validate your client’s requests to start or join a meeting.

Documentation on this is available here: [Meeting SDK Authorization](https://developers.zoom.us/docs/meeting-sdk/auth/).

We also have a sample signature application which can be used as a good starting point: [Sample Meeting SDK Signature App - Node JS](https://github.com/zoom/meetingsdk-sample-signature-node.js)

If the signature provided is invalid, the SDK will most commonly respond with one of the following error messages:

- [Signature is invalid](https://devforum.zoom.us/sample-apps/devrel-content-review/-/blob/c04f6a5cd0aaa040d3ef4072d583454be19077b7/Content%20Directory/MeetingSDK/troubleshooting-meeting-sdk-jwt-validation.md)
- [Invalid SDK App Keys](https://devforum.zoom.us/sample-apps/devrel-content-review/-/blob/c04f6a5cd0aaa040d3ef4072d583454be19077b7/Content%20Directory/MeetingSDK/troubleshooting-meeting-sdk-jwt-validation.md)

* * *

## Invalid signature tokens

Signature tokens may be invalid if they are missing expected formats or fields. If you have an invalid signature, verify the following:

- The token has all required fields.
- Values in the token are correct
- The token `exp` date matches the expected rules.

* * *

## Timestamps and expired tokens

Zoom uses Unix Epoch time to determine the creation and expiration time of the token.

The Meeting SDK expects a minimum JWT `exp` date of 1800 seconds (30 mins) greater than `iat` value and a maximum value of 48 hours greater than the `iat` value.

When checking timestamps and expiration, ensure the following:

- `iat` value is the current time.
- `iat` value is long format, not a string.
- `tokenExp` or `exp` should be in Unix Epoch time.
- `exp` value is greater than `tokenExp`.

Ensure your server clock has not drifted, and verify the token’s validity period. [Epochconverter](https://www.epochconverter.com/) provides an easy-to-use interface for getting the current date and time in epoch format and future dates.

* * *

## Example Meeting SDK JWT payloads

The header for the Meeting SDK JWT will be the same across all platforms; however, the payload properties for Mobile/Desktop and Web are slightly different. See examples below:

### Web SDK signature payload

For the Web Meeting SDK, include the sdkKey, mn, role, iat, exp, and tokenExp properties. The values for exp and tokenExp will be the same.

```auto
{
  "sdkKey": SDK_KEY,
  "mn": MEETING_NUMBER,
  "role": ROLE,
  "iat": 1646937553,
  "exp": 1646944753,
  "tokenExp": 1646944753
}

```

### Mobile/Desktop SDK signature payloads

For apps built using a mobile or desktop Meeting SDK (iOS, Android, macOS, Windows, Electron), include the appKey, exp, and tokenExp properties. The values for exp and tokenExp will be the same.

```auto
{
  "appKey": SDK_KEY,
  "iat": 1646937553,
  "exp": 1646944753,
  "tokenExp": 1646944753
}

```

### Web and Mobile/Desktop signatures

For a signature generation function that works across web, mobile, and desktop platforms, include the appKey, sdkKey, exp, tokenExp, mn, and role properties. The values for appKey and sdkKey will be the same, and the values for exp and tokenExp will be the same.

```auto
{
  "appKey": SDK_KEY,
  "sdkKey": SDK_KEY,
  "mn": MEETING_NUMBER,
  "role": ROLE,
  "iat": 1646937553,
  "exp": 1646944753,
  "tokenExp": 1646944753
}

```

* * *

## Steps to troubleshoot

### 1. Reproduce with the sample Node.js app

If you are generating a signature in your application and still getting an invalid signature error, the best first step is to test your credentials with the sample app. For a low-effort way to test manually, take the generated signature from the sample app and enter the signature property value for the SDK. This helps to compare your signature and isolate whether your function is generating the signature correctly.

### 2. Verify with [JWT.io](http://JWT.io)

[JWT.io](http://jwt.io/) provides an excellent tool to decode and debug a JSON Web Token. You can use this tool to verify your token’s structure or build a token using a header and payload.

The header includes the signing algorithm and the token type. The payload section describes the authorization granted. It contains the token’s claims, the information passed about the user, and any metadata required.

If signature validation is failing, use [JWT.io](http://JWT.io) to decode the signature and verify its format and property values. Here is a demo of what that looks like :

https://www.loom.com/embed/aaacfd30ca1646cfb78730943380fbcc

### 3. If that doesn’t work, here are common issues we’ve seen:

- Make sure you’re using a Meeting SDK app type, not OAuth or server-to-server OAuth.
- If you’re using `Math.round()` in JavaScript, verify that you’re not returning a timestamp 10-30 seconds greater than your intended value.
- Verify the local time on your computer is auto-syncing the system time correctly. It is recommended to generate the signature on the server side, in UTC / GMT to avoid timezone/time sync issues, and also to keep your Client Secret, Secret!
- Verify the JSON header or payload uses curly quotes instead of straight quotes.
- Verify `tokenExp` is larger than `exp`
- Verify timestamps are in Unix epoch format and satisfy the following:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/f/0f289ad3fb402bb5773479020ac67e96c13455a0.png)

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 3, 2023, 8:39pm UTC](https://devforum.zoom.us/t/troubleshooting-meeting-sdk-signature-validation/85961/2 "2023-04-03T20:39:36Z")

</div>

# Resources :

## 🔗JSON Web Token (JWT) RFC

> **[RFC 7519: JSON Web Token (JWT)](https://datatracker.ietf.org/doc/html/rfc7519)**
>
> JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext...

# 🔗Create a Meeting SDK App

> **[Create a Meeting SDK app](https://developers.zoom.us/docs/meeting-sdk/create/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

# 🔗 Meeting SDK Authorization

> **[Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/#generate-a-meeting-sdk-jwt)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

## 🔗Generate a Meeting SDK JWT

> **[Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/#generate-a-meeting-sdk-jwt)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

# 🔗Zoom Meeting SDK Auth Endpoint sample

> **[GitHub - zoom/meetingsdk-auth-endpoint-sample: Generate a Meeting SDK JWT to join Zoom meetings...](https://github.com/zoom/meetingsdk-auth-endpoint-sample)**
>
> Generate a Meeting SDK JWT to join Zoom meetings and webinars with the Meeting SDK.

# 🔗How to create a sample JWT for the Meeting SDK

> **[Support](https://developers.zoom.us/support/)**
>
> Support plans that provide prioritized developer-specific resources.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 4, 2023, 6:40am UTC](https://devforum.zoom.us/t/troubleshooting-meeting-sdk-signature-validation/85961/3 "2023-05-04T06:40:22Z")

</div>

Closed on May 4, 2023, 6:40am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
