Using this template helps us debug your issues more effectively
Description
I am trying to use the Api to add a meeting registrant but getting the error invalid access token 124 when I do so. My JWT token works for many of the Api calls even the ones that it says oAuth on but not for these
batch_registrants
registrants
The ones that work with JWT so far ive tested are
/users/
/meetings
/groups
Is there any way to use these apis without setting up oAuth?
My end goal is to add and remove registrants via api depending on whether or not they have paid a subscription fee for my website. I have a list of email addresses I want to register but no way currently to add them via the api. Could anyone help here?
Here is some example code that gives me the error
Error
port: null,
nativeProtocols: { 'http:': [Object], 'https:': [Object] },
pathname: '/v2/meetings/89063002983/batch_registrants'
},
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 330,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *2],
_currentUrl: 'https://api.zoom.us/v2/meetings/89063002983/batch_registrants',
[Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [ 'Accept', 'application/json, text/plain, */*' ],
'content-type': [ 'Content-Type', 'application/json' ],
'user-agent': [ 'User-Agent', 'axios/0.26.1' ],
'content-length': [ 'Content-Length', 330 ],
host: [ 'Host', 'api.zoom.us' ]
}
},
data: { code: 124, message: 'Invalid access token.' }
},
isAxiosError: true,
toJSON: [Function: toJSON]
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
Which Endpoint/s?
/batch_registrants
/registrants
Screenshots (If applicable)
example code (that gives the error
function addRegisteredUSerToMeeting() {
const options = {
headers: { authorization: jwtApiKey },
body: {
auto_approve: true,
registrants: [
{
email: 'test@gmail.com',
first_name: 'test',
last_name: 'test',
},
],
},
};
axios.post(`https://api.zoom.us/v2/meetings/${testMeeting123}/batch_registrants`, options).then((response: any) => {
console.log(response.data);
});
}
addRegisteredUSerToMeeting();