Empty Downloads

Hello Team,

I’ve been getting an error when I tried downloading recorded meeting from Zoom.
See the detailed explanation below.

  1. When I tried to download the recorded file, the downloaded is successful but file is empty and it is 0KB. But the Original file size is about 3 MB.

Programming language and Framework: NODE
Authentication method: OAuth
Errors: There is no error logged

exports.addZoomRecordingToIntaviewer = asyncHandler(async (req, res, next) => {
  const { token } = req.body;
  const { meetingId } = req.params;
  const user = req.user;
  const url = `https://api.zoom.us/v2/meetings/${meetingId}/recordings`;

  const meetingData = await axios.get(url, {
    headers: {
      Authorization: `Bearer ${token}`,
    },
  });
  if (!meetingData) {
    return next(new ErrorResponse("Meeting Does Not Exists", 403));
  }
  const meeting = meetingData.data;

  const { id, recording_files, duration } = meeting;
  const urlDown = `${recording_files[0].download_url}?access_token=${token}`;


  function downloadFile(downloadUrl, name) {
    const req = https.get(downloadUrl, function (res) {
      const fileStream = fs.createWriteStream(`zoomer/${name}.mp4`);
      res.pipe(fileStream);
      fileStream.on("error", function (err) {
        console.log("Error writing to the stream");
        console.log(err);
      });
      fileStream.on("finish", function () {
        fileStream.close();
        console.log("done");
      });
    });
    req.on("error", function (err) {
      console.log("Error http request");
      console.log(err);
    });
  }
  downloadFile(urlDown, id);
});

Hey @ppo,

Thank you for reaching out to the Zoom Developer Forum. Please test navigating to the download_url ( with the access_token) in your browser. Let me know if you’re seeing any errors on the page or within the browser console when doing so.

This will help us to confirm if there is an issue with the recording itself or with the code reading the file.

Thanks,
Max

Good day,

No I did not get any errors, instead I got a prompt to download the video and when I did, the video downloaded without any problems.

Hey @ppo,

Thank you for testing that! Please send an email to developersupport@zoom.us with a link to this thread. In that email, please include the meeting ID involved, the meeting ID as well as the access_token that you’re using for this request.

I’ll test this out on my end and reach out to an internal resource if necessary.

Thanks,
Max

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.