How to Delete Zoom Recording from API

I am writing to request the deletion of a meeting recording and meeting details from our Zoom account from the code. I am unable to find the Scopes[DELETE] and API documentation for deleting meeting recording so could you please assistance for this issue.

Hi @ramki ,

Here’s the API endpoints of interest and you’ll see the scopes labeled there as well:

Hello @gianni.zoom
Thank you for your response, but I am still getting the error that I have mentioned below.

async function deleteRecording() {
  const accountId = "*********";
  const meetingId = "*******";
  const recordingId = "*********";

  try {
    const deleteResponse = await axios.delete(`https://api.zoom.us/v2/accounts/${accountId}/meetings/${meetingId}/recordings`, {
      headers: {
        'Authorization': `Bearer ${accessToken}`,
      },
    });

    console.log("Recording deleted successfully:", deleteResponse.data);
  } catch (error) {
    console.error('Error deleting recording:', error.response.data);
  }
}
deleteRecording();
I am getting the error while doing deletion:

{

"code": 4711,

"message": "Invalid access token, does not contain scopes:[recording:master, recording:write:master]."

}

I am getting invalid scopes, but I have given scopes in the code and marketplace, but I am unable to find the [recording:write:master]. I only found the [recording:master].


![image|690x207](upload://iU7qhDTLC7iQBR7VHnL5TXvBikR.png)

If a Zoom call is recorded on the cloud, can someone access the recording and metadata? If yes, what system is required?

Hi @ramki ,

This is the master account endpoint. Do you have a master-subaccount structure? If not, please use the endpoint I linked earlier. The difference is the {accoundId} portion.

If you do in fact have a master-subaccount structure with appropriate scopes added, please try uninstalling your app, regenerating your application credentials, and generating a new access token with the generated credentials. Use the new token to access the endpoint.

Hello Gianni,

That issue was resolved, so I want to know how I can get total cloud storage in Zoom.
can I achieve this with an API? If possible, could you suggest me?

@ramki , what do you mean by total cloud storage?

Here’s our support docs on cloud recording:
https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0063923
https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0067670

I need to retrieve comprehensive storage details for all completed meetings. For instance, I want to find out how much space ten finished meetings take up in the cloud. Can you help me understand the total storage used by these meetings?

Hi @ramki ,

That will depend on the meeting size, length and features used during the meeting. This support article reviews this and has helpful links for seeing how much storage is being used:

https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0067670

Hi Gianni,
I’m asking for access to Zoom’s whole cloud storage via an API.
Can I make this happen?

Hi @ramki , you can see all the recordings for individual users, but not all recordings across an entire account via API at this time.

Thanks for the information.
1)I am getting the zoom all recording storages, but I found that there is something different storage type in the recording so I want to type of the total storage and how to convert it to MB. Can you help to achieve it?

"type":4,
"start_time":"2024-03-05T06:15:30Z",
"timezone":"Asia/Kolkata",
"duration":0,
"total_size":975361,
"recording_count":3,
  1. we can only get the personal meetings stored in the cloud only we can’t get the all meetings.

Hi @ramki ,

It is the value in bytes, so you can convert to MB afterwards.

Thank you Gianni,
I need another query. we can only get the personal meetings stored in the cloud only we can’t get the all meetings.

Hi @ramki , check settings:

https://support.zoom.com/hc/en/category?id=kb_category&kb_category=55597a9a8720391089a37408dabb353e

Hello Gianni,
I am facing an issue with Webhook in that the that the URL is not validating.

I am developing an application in Zoom, so when I use the Ngrok URL, event notification endpoint URL [production] will be validated, but when I host my web application in Catalyst, it will not be validated with the production URL. When I deploy into Catalyst, the URL will be generated in the developing mode, so I am converting it into the production URL, which is the URL I have given in the web application URL in the event notification endpoint URL [production]. It will not validate the same process when I use Ngrok.

Nodejs Code to validating the End point URL:

const message = `v0:${req.headers['x-zm-request-timestamp']}:${JSON.stringify(req.body)}`
  console.log("Message :", message)
  const hashForVerify = crypto.createHmac('sha256', process.env.ZOOM_WEBHOOK_SECRET_TOKEN).update(message).digest('hex')
  // hash the message string with your Webhook Secret Token and prepend the version semantic
  const signature = `v0=${hashForVerify}`
  if (req.headers['x-zm-signature'] === signature) {
    if (req.body.event === 'endpoint.url_validation') {
      const hashForValidate = crypto.createHmac('sha256', process.env.ZOOM_WEBHOOK_SECRET_TOKEN).update(req.body.payload.plainToken).digest('hex')
      response = {
        message: {
          plainToken: req.body.payload.plainToken,
          encryptedToken: hashForValidate
        },
        status: 200
      }
      console.log(response.message)
      res.status(response.status)
      res.json(response.message)
    } else {
      response = { message: 'Authorized request to Zoom Webhook.', status: 200 }
      console.log("response", response.message)
      res.status(response.status)
      res.json(response)
      // business logic here, example make API request to Zoom or 3rd party
      console.log("Upload into workdrive...");

Note: This code will be working good when i was use Ngrok so the problem is after deploying the application URL is not validating.

Hi @ramki ,

Just sent you a private message. Please respond there with the info I need.

Issue was resolved on customer side. It required DNS configuration.