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:
- Clone the Git repo https://github.com/zoom/zoom-api-jwt
- Configure with our API key and secret
- Run the code
- 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.