Invalid JWT Token in node app

Description
I’ve developed a simple node app to help us upload registration lists to our zoom meeting. The app is taking in the Bearer jwt token, but I’m still getting an “invalid token” error

Error

code: 124, message: ‘Invalid access token.’

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

JWT

Which Endpoint/s?

https://api.zoom.us/v2/meetings/${meetingId}/registrants

How To Reproduce (If applicable)

await axios({
method: “post”,
url: https://api.zoom.us/v2/meetings/${meetingId}/registrants,
qs: {status: “active”},
Authorization: bearer,
Body: body

both the meetingId and the token are logging correctly.

Hi @YIAdvisors,

Thanks for reaching out about this—happy to take a closer look.

Can you please share the Meeting ID you’re passing? Additionally, have you confirmed that your token expiration date is valid?

Thanks,
Will

Hi Will!

the Meeting ID is 95662889845. I’ve tried re-generating the JWT, and the error message I get back has Authorization: ‘Bearer < jwt >’ where the jwt value is equal to the one I just generated.

Phelan

Hi @YIAdvisors,

Thanks for sharing that—in taking a look at the meeting and your account, I don’t see any limitations that would be causing this. Can you please ensure you’re sending your request as follows?

Request URL and Body (Replace with your own Meeting ID)

Authorization Header
“Bearer {yourJwtToken}”

Have you tried sending the request from Postman or our Sample Request tool in the documentation?

Let me know!
Will

Thanks a ton, still not sure what the issue is but the code sample from Postman worked great.

1 Like

Happy to hear you got it working. Let us know if we can help further getting it to work in your environment.

Thanks,
Tommy