# Webtoken not acceptable for api calls

**URL:** <https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339>\
**Category:** API and Webhooks\
**Created:** [October 6, 2020, 2:43pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339 "2020-10-06T14:43:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadavtalalmagor](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nadavtalalmagor/32/6972_2.png) [@nadavtalalmagor](https://devforum.zoom.us/u/nadavtalalmagor)\
**Post date:** [October 6, 2020, 2:43pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/1 "2020-10-06T14:43:22Z")

</div>

**Description**  
I opned my account a few months ago to experiment.  
Now i need to develop and my webtokens are unacceptable for api calls.  
i get 401 messages. i tried testing it out on your website with the same result.  
is this because i didnt use the accoutn for a while?  
my app shows as “Activated” but “Intend to publish: No Account Level” is showing.

**Error**  
Error: Request failed with status code 401  
**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT  
Knowing the endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

**Which Endpoint/s?**  
“/users”

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
**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:** [October 7, 2020, 4:49pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/2 "2020-10-07T16:49:48Z")

</div>

Hey @nadavtalalmagor,

Can you ensure that the expiration timestamp for your token hasn’t expired? This would be the most likely cause. The JWTokens contain an `exp` field that I would recommend double checking. You can also generate these via your JWT app in the marketplace, and set the expiration date there:

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

Let me know if this helps!

Best,  
Will

---

<div class="post-metadata">

**Author:** ![nadavtalalmagor](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nadavtalalmagor/32/6972_2.png) [@nadavtalalmagor](https://devforum.zoom.us/u/nadavtalalmagor)\
**Post date:** [October 7, 2020, 5:15pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/3 "2020-10-07T17:15:04Z")

</div>

Hi and thanjs for ykur reply.  
I regenerated a new jwt token from my accout and tried using it and got the 401 response.  
Is there a time limit for using zoomapi?  
Do i need a “pro account” or something?  
Thank you very much

---

<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:** [October 8, 2020, 6:31pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/4 "2020-10-08T18:31:45Z")

</div>

Hey @nadavtalalmagor,

What endpoint are you trying to hit? Can you share your full request and the response here? I’ll be happy to take a closer look.

Best,  
Will

---

<div class="post-metadata">

**Author:** ![nadavtalalmagor](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nadavtalalmagor/32/6972_2.png) [@nadavtalalmagor](https://devforum.zoom.us/u/nadavtalalmagor)\
**Post date:** [October 9, 2020, 11:34am UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/5 "2020-10-09T11:34:33Z")

</div>

Hi. The endpont is [https://api.zoom.us/v2/](https://api.zoom.us/v2/)users  
The error is “Request failed with status code 401”  
This is the token  
Thanks for your help

const zoomApiBaseUrl = ‘[https://api.zoom.us/v2/](https://api.zoom.us/v2/)’;  
const axios = require(‘axios’)

const getUsers = async (req, res) =\> {  
console.log(‘getting zoom user’)  
console.log(zoomApi.zoomMainJwtToken)  
const url = zoomApiBaseUrl + ‘users’  
var options = {

qs: {  
status: ‘active’ // -\> uri + ‘?status=active’  
},  
auth: {  
//Provide your token here  
‘bearer’: zoomApi.zoomMainJwtToken  
},  
headers: {  
‘User-Agent’: ‘Zoom-Jwt-Request’,  
‘content-type’: ‘application/json’  
},  
json: true // Automatically parses the JSON string in the response  
};  
// const response = await axios.get(url)  
axios({  
method: ‘get’,  
url: url,  
config: options,  
})

---

<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:** [October 9, 2020, 8:33pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/6 "2020-10-09T20:33:13Z")

</div>

Hey @nadavtalalmagor,

Thanks for providing that! In testing this endpoint just now, I was able to successfully retrieve users with the token you shared.

Can you try submitting this request in Postman and let me know if you experience the same issue? Here are the details you should provide:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/1/41d6a2e7860c416e668c8ff4fade65c92b6f5654.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/4/243cc2c4d9b27e84eff10d8f8a749dd5338e356f.png)

Thanks!  
Will

---

<div class="post-metadata">

**Author:** ![nadavtalalmagor](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nadavtalalmagor/32/6972_2.png) [@nadavtalalmagor](https://devforum.zoom.us/u/nadavtalalmagor)\
**Post date:** [October 9, 2020, 9:35pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/7 "2020-10-09T21:35:57Z")

</div>

Thank you very much.  
Your tutorials are showing how to to use nodejs with request library which is depricaded so it will be great if it show with axios ot other builtin libraries.  
Do you have the exact syntax for axios request? i want to make sure everything is right there.  
Tjank you very much for your help

---

<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:** [October 12, 2020, 6:35pm UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/8 "2020-10-12T18:35:11Z")

</div>

Hey @nadavtalalmagor,

I’m glad that was helpful! While I don’t have the exact syntax for Axios, you might consider using the **Code** generator/button in Postman to generate a code snippet for NodeJs-Axios.

I hope this helps!

Best,  
Will

---

<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:** [November 12, 2020, 4:35am UTC](https://devforum.zoom.us/t/webtoken-not-acceptable-for-api-calls/32339/9 "2020-11-12T04:35:13Z")

</div>

Closed on November 12, 2020, 4:35am UTC

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