# Invalid JWT Token following demo instructions

**URL:** <https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058>\
**Category:** API and Webhooks\
**Created:** [March 6, 2021, 11:45pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058 "2021-03-06T23:45:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![MBlyth](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MBlyth](https://devforum.zoom.us/u/MBlyth)\
**Post date:** [March 6, 2021, 11:45pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/1 "2021-03-06T23:45:07Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
I have created an app with JWT authorization and am trying to test it with the curl command shown in the example,

```
curl --request GET \
--url 'https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1' \
--header 'authorization: Bearer { your_token }' \
--header 'content-type: application/json

```

My command line:

`curl --request GET --url "https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1" --header "authorization: Bearer { }" --header "content-type: application/json"`

I have followed instructions in other tickets such as regenerating the secret key and the token. I have checked that the token is not expired and that it validates.

**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?**

Users

**Screenshots (If applicable)**

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/e/be888a05ec7550915e13ce10f452a2930c602a80.png)

**Additional context**  
Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 8, 2021, 4:58pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/2 "2021-03-08T16:58:34Z")

</div>

Hi @MBlyth,

Thanks for reaching out about this, and happy to help. To clarify, how are you generating your token? Have you tried generating the token using the embedded token generator from your JWT App, and do you run into the same issue?

If you’re using a library to generate the token programmatically, it could be an issue with the library you’re using

Let me know—thanks,  
Will

---

<div class="post-metadata">

**Author:** ![MBlyth](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MBlyth](https://devforum.zoom.us/u/MBlyth)\
**Post date:** [March 11, 2021, 4:15am UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/3 "2021-03-11T04:15:15Z")

</div>

Thanks. I should have explained that in my question, right? I did create the token from the embedded generator. I haven’t gotten as far as using a library. Expiration was not an issue, and I tried several times. As I said, I did regenerate the secret key also, and tried to use the new token. Same problem.

---

<div class="post-metadata">

**Author:** ![MBlyth](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MBlyth](https://devforum.zoom.us/u/MBlyth)\
**Post date:** [March 11, 2021, 5:25am UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/4 "2021-03-11T05:25:29Z")

</div>

A colleague generated a new token and used a Python library to successfully access the API with no problems. However, we both tried cURL with the same token and it failed. Apparently the example in the [Zoom documentation](https://marketplace.zoom.us/docs/guides/auth/jwt) is either incorrect or depends on some other settings or contingencies. (That’s the example I cited in my original question.)

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 11, 2021, 8:40pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/5 "2021-03-11T20:40:05Z")

</div>

Hey @MBlyth,

Ah, I see. Thanks for clarifying. Can you make sure that your cURL request isn’t missing a `'` at the end of the last header and let me know if you still see the issue? It looks like our sample snippet is missing an end quote—we will work on updating this.

cc @shrijana.g

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![MBlyth](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MBlyth](https://devforum.zoom.us/u/MBlyth)\
**Post date:** [March 11, 2021, 9:28pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/6 "2021-03-11T21:28:27Z")

</div>

It’s true that the example is missing the end quote, but my request (see initial post) wasn’t. I changed all the single quotes to double because singles were causing cURL to crash, but they are all paired correctly I think.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 12, 2021, 3:30pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/7 "2021-03-12T15:30:18Z")

</div>

Hey @MBlyth,

Thank you for confirming—are you sending your cURL command directly from your console/terminal? Is there anything unique about your environment? I’m glad it’s working via Python script, etc., but I’m wondering if there might be something about your environment that could be throwing this error.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![MBlyth](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MBlyth](https://devforum.zoom.us/u/MBlyth)\
**Post date:** [March 13, 2021, 7:46pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/8 "2021-03-13T19:46:01Z")

</div>

No, nothing unique; I’m just copying it to a Windows 10 command line.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 15, 2021, 2:20pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/9 "2021-03-15T14:20:20Z")

</div>

Thanks for confirming @MBlyth. Do you get the same error when copying the cURL command generated directly from Postman, for example?

---

<div class="post-metadata">

**Author:** ![MBlyth](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MBlyth](https://devforum.zoom.us/u/MBlyth)\
**Post date:** [March 16, 2021, 9:08pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/10 "2021-03-16T21:08:19Z")

</div>

OK, I finally found the error. The example shows `... Bearer { your_token } ...` which I interpreted to mean that there should be brackets around the token. That was the whole problem. Remove the brackets and it works. For those like me who are new to all this, it would be good to clarify that in the documentation, but after the fact it makes perfect sense.

Thanks.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 16, 2021, 10:54pm UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/11 "2021-03-16T22:54:31Z")

</div>

Hey @MBlyth,

I’m glad to hear that you resolved your issue! We’ll continue working to make our documentation clearer and use your feedback for that process.

Please don’t hesitate to reach out if you encounter any further issues or questions.

Thanks,  
Max

---

<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:** [April 16, 2021, 8:54am UTC](https://devforum.zoom.us/t/invalid-jwt-token-following-demo-instructions/45058/12 "2021-04-16T08:54:36Z")

</div>

Closed on April 16, 2021, 8:54am UTC

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