Description
When I try to delete a recording, I do not get any errors but the recording does no get delete using NODEJS
I’m using the OAuth for authentication
Which Endpoint/s?
https://api.zoom.us/v2/meetings/${meetingId}/recording?action=trash
How To Reproduce (If applicable)
Steps to reproduce the behavior:
- Request URL / Headers (without credentials) / Body
- See error
This the code calling the endpoint
exports.deleteRecording = asyncHandler(async (req, res, next) => {
const { meetingId } = req.params;
const { token } = req.body;
const url = https://api.zoom.us/v2/meetings/${meetingId}/recording?action=trash
;
try {
const zoomResponse = await axios.delete(url, undefined, {
headers: {
authorization: Bearer ${token}
,
},
});
if (zoomResponse.status !== 204) {
return next(new ErrorResponse(“Recording Could not be deleted”));
}
if (zoomResponse.status === 204) {
return res.status(200).json({
success: true,
message: “Recording deleted”,
});
}
} catch (error) {
return next(new ErrorResponse(“An error occured”, 500));
}
});