Hi Guys, I did one server on NODE SJ with framework express. I made the get request and everything is ok it all work. I created a second POST request and when I POST call to request the Zoom logs is receive the GET request.
Does somebody know where is the problem?
this is the node code:
app.post( ‘/webinars/:id’, ( req, res ) =>
{
const webinarsRegistrants = {
uri: https://api.zoom.us/v2/webinars/${ req.params.id }/registrants
,
qs: {
status: ‘active’
},
auth: {
‘bearer’: token
},
headers: {
‘User-Agent’: ‘Zoom-api-Jwt-Request’,
‘content-type’: ‘application/json’
},
body: req.body,
json: true //Parse the JSON string in the response
};
//Use request-promise module’s .then() method to make request calls.
rp( webinarsRegistrants )
.then( function ( response )
{
//printing the response on the console
console.log( ‘Zoom responce’, response );
res.json( {
data: response,
token: token
} );
} )
.catch( function ( err )
{
// API call failed...
console.log( 'API call failed, reason ', err );
} );
} );
this is the ZOOM logs:
{
“endpoint”: “https://api.zoom.us/v2/webinars/(webinarID)/registrants”,
“response_headers”: [
“Set-Cookie: zm_aid=”“; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly”
],
“date_time”: “2022-08-10 11:27:58”,
“method”: “GET”,
“request_body”: “N/A”,
“response”: “{ …”,
“request_headers”: [
“accept: application/json”,
“authorization: ******”,
“connection: close”,
“content-type: application/json”,
“user-agent: Zoom-api-Jwt-Request”
],
“request_params”: [
“status: active”
],
“http_status”: “200”
}