# How do I set a JWT expiration date out past 1 week?

**URL:** <https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233>\
**Category:** API and Webhooks\
**Created:** [November 14, 2021, 1:41pm UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233 "2021-11-14T13:41:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mixelpix](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mixelpix/32/32610_2.png) [@mixelpix](https://devforum.zoom.us/u/mixelpix)\
**Post date:** [November 14, 2021, 1:41pm UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/1 "2021-11-14T13:41:06Z")

</div>

**Description**  
When I use the JWT token provided by the Zoom App Credentials page, cURL commands work as expected.

When I modify the “exp” date using [JWT.io](http://JWT.io), I get an “invalid HmacSHA256” error msg.

When I paste the JWT token created in the Zoom App Credentials page into [JWT.io](http://JWT.io)’s “Encoded” window and modify the payload by updating the “exp” value in the “Decoded” window, I get the following error using the new encoded JWT token string:

**Error**  
`{"code":124,"message":"The Token's Signature resulted invalid when verified using the Algorithm: HmacSHA256"}`

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**  
All of them.

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Copy JWT token from Zoom App Credentials page
2. Paste inito [JWT.io](http://JWT.io) “Encoded” window
3. Modify payload “exp” value, e.g. from `"exp": 1637500704,` to `"exp": 1637524740,`
4. Copy updated JWT token from [JWT.io](http://JWT.io) “Encoded” window
5. Paste updated JWT token into cURL command line `--header 'authorization: Bearer { updated_jwt_token }`

**Screenshots (If applicable)**  
Same behavior with or without the “secret base64 encoded” option

 ![Screen Shot 2021-11-14 at 6.25.45 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/d/2d6ce1048590c077a59ddc355b8b626d00fcf82f.png)  
 ![Screen Shot 2021-11-14 at 6.25.55 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/5/b5323f6ffc4be2fb564b86f9543508f65b636a35.png)

**Additional context**  
The cURL command works just fine using the JWT token provided by the Zoom App Configuration page. If I cannot customize the JWT token expiration value with [JWT.io](http://JWT.io), why should I expect their libraries to work?

The cURL PATCH command:

```auto
curl --request PATCH \
  --url 'https://api.zoom.us/v2/meetings/1234567890' \
  --header 'authorization: Bearer { auth_token } \
  --header 'content-type: application/json' \
  --data-raw '{
    "settings": {
      "alternative_hosts": "name@fake.email;name2@fake.email;name3@fake.email"
    }
  }'

```

The [JWT.io](http://JWT.io) settings:

 ![Screen Shot 2021-11-14 at 7.15.24 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/e/7e9367fd1a474cab39a683b9f7a5d569f4d3a9b7.png)

---

<div class="post-metadata">

**Author:** ![mixelpix](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mixelpix/32/32610_2.png) [@mixelpix](https://devforum.zoom.us/u/mixelpix)\
**Post date:** [November 14, 2021, 6:14pm UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/2 "2021-11-14T18:14:32Z")

</div>

lol… I figured out the problem I was having with the Zoom App Credentials “Other” option. It wasn’t working in Safari …works fine in Chrome 😅

The token updates in Chrome after entering the “Other” date (`hh:mm MM/DD/YYYY` format).

Still not sure what I’m doing wrong with [JWT.io](http://JWT.io) though 🤔

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [November 14, 2021, 11:26pm UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/3 "2021-11-14T23:26:24Z")

</div>

Hi @mixelpix ,

Happy to help! You can use something like [https://www.unixtimestamp.com/](https://www.unixtimestamp.com/) to convert the time you want to IAT format and paste that value in the payload or the bearer token on [jwt.io](http://jwt.io).

It’ll update the encoded bearer token with the new time value.

Gianni

---

<div class="post-metadata">

**Author:** ![mixelpix](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mixelpix/32/32610_2.png) [@mixelpix](https://devforum.zoom.us/u/mixelpix)\
**Post date:** [November 15, 2021, 12:50am UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/4 "2021-11-15T00:50:43Z")

</div>

@gianni.zoom thanks. Isn’t it just epoch time? E.g. to set a valid future date, just make the `exp` date a larger integer than the `iat` date? I.e. do I need another service to create a valid date? I don’t think do, especially since the [JWT.io](http://JWT.io) has a human readable interpretation of the epoch time value entered for the `exp` time (just hover the cursor over it).

I’m pretty sure a valid `exp` value is not the problem here, e.g. you could just advance the left-most integer by one to create a valid future date value.

The problem is that the resulting JWT isn’t valid (even though the components encoded are).

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [November 17, 2021, 12:21am UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/5 "2021-11-17T00:21:15Z")

</div>

Sorry @mixelpix – I misread and misunderstood what you said with the respect to the issue you’re having!

One possible source of trouble I see is that the payload format for your inputs on [jwt.io](http://jwt.io) [do not match the structure on our documentation](https://marketplace.zoom.us/docs/guides/auth/jwt).

Per our documentation, try the following payload syntax:

```auto
{
  "iss": "API_KEY",
  "exp": 1496091964000
}

```

`iss` , the issuer of the token, is your API Key.

`exp` is the expiration timestamp of the token in seconds since Epoch (unix epoch time).

You can add and test with the “iat” value as well.

Let me know if this yields a working token for you.

Gianni

---

<div class="post-metadata">

**Author:** ![mixelpix](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mixelpix/32/32610_2.png) [@mixelpix](https://devforum.zoom.us/u/mixelpix)\
**Post date:** [November 17, 2021, 12:43am UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/6 "2021-11-17T00:43:37Z")

</div>

@gianni.zoom thanks for the suggestions - turns out I wasn’t adding the API secret in the decoded gui for generating a valid encoded JWT 😅

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [November 17, 2021, 2:16pm UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/7 "2021-11-17T14:16:45Z")

</div>

Super happy you have it all worked out! Thanks for the update!

---

<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:** [December 18, 2021, 12:17am UTC](https://devforum.zoom.us/t/how-do-i-set-a-jwt-expiration-date-out-past-1-week/60233/8 "2021-12-18T00:17:13Z")

</div>

Closed on December 18, 2021, 12:17am UTC

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