JWT app returns "invalid token"

Description
We have created a JWT app. We are trying to authenticate our API requests using JWT as instructed by Zoom. We have cloned this repo and configured our API key and secret accordingly: https://github.com/zoom/zoom-api-jwt

Error

{code: 124, message: 'Invalid access token.'}

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

Which Endpoint/s?
https://api.zoom.us/v2/users/email@domain.org?status=active

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

  1. Clone the Git repo https://github.com/zoom/zoom-api-jwt
  2. Configure with our API key and secret
  3. Run the code
  4. See error in console log output

Our particular JWT signing code is:

const secs = parseInt((new Date()).getTime() / 1000)

//Use the ApiKey and APISecret from config.js
const payload = {
    iss: config.APIKey,
    exp: secs + 60,
};
const token = jwt.sign(payload, config.APISecret)

We chose an expiration of 60 seconds. If we use milliseconds instead of seconds, we get the exact same error.

Screenshots (If applicable)
N/A

Additional context
We have also tried this Curl request:

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

We set the value of TOKEN according to your credentials page (for our app), and we get the exact same error.

We have deactivated and activated the app a number of times and this does not fix our problem either.

We notice that there are 2 entries in our app “call log” but we did not make those requests. We have been unsuccessful in every attempt to use a JWT token - both using the Git repo (NodeJS code) and using the JWT token from the credentials web page of the app.

Hi @Fitpass,

We apologize that you are running into this issue. Could you send me your Zoom Account Number located in your Account Profile page via message? Thank you.

I just tried the API 2 minutes ago and it worked (hitting the https://api.zoom.us/v2/users/me endpoint via Curl

Thanks so much for your help. Right now things are good. I don’t believe I need more support.

PS I made no changes, so it must have been a Zoom internal configuration change that enabled my API usage.

2 Likes

Hey @Fitpass,

Happy to hear we fixed your issue! :slight_smile:

Let us know if you have other questions or run into any other issues!

Thanks,
Tommy

Hi
I’m still having “Invalid access token.”, I’m not sure if I’m runnin into this issue or I have missed somthing.
My account number is 2001033667

Thanks