# Unable to download cloud storage recording via curl api

**URL:** <https://devforum.zoom.us/t/unable-to-download-cloud-storage-recording-via-curl-api/73392>\
**Category:** Cloud Recordings\
**Created:** [August 2, 2022, 7:45am UTC](https://devforum.zoom.us/t/unable-to-download-cloud-storage-recording-via-curl-api/73392 "2022-08-02T07:45:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirav.soni](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirav.soni/32/40004_2.png) [@nirav.soni](https://devforum.zoom.us/u/nirav.soni)\
**Post date:** [August 2, 2022, 7:45am UTC](https://devforum.zoom.us/t/unable-to-download-cloud-storage-recording-via-curl-api/73392/1 "2022-08-02T07:45:42Z")

</div>

Hi,

I m using API ([https://api.zoom.us/v2/meetings/{metting\_id}/recordings](https://api.zoom.us/v2/meetings/%7Bmetting_id%7D/recordings)) to get meeting details via JWT Token. its work fine for me. In this response i m getting Download & Play URL without any extensions.

eg:  
/us02web.zoom.us/rec/play/xxxx…  
/us02web.zoom.us/rec/download/xxxx…

If i paste download url in the browser then recording successfully downloading. but i want to download video recording via script. Currently i m using PHP script to download and save recording on my server. but i m unable to save recording in mp4 format on my server its save as a text file.

So please help me to how to download recorded video from cloud storage from zoom to my server.

---

<div class="post-metadata">

**Author:** ![carolynquinnxe8z](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carolynquinnxe8z/32/24530_2.png) [@carolynquinnxe8z](https://devforum.zoom.us/u/carolynquinnxe8z)\
**Post date:** [September 15, 2022, 1:56pm UTC](https://devforum.zoom.us/t/unable-to-download-cloud-storage-recording-via-curl-api/73392/2 "2022-09-15T13:56:48Z")

</div>

Have you found a solution to this issue?

---

<div class="post-metadata">

**Author:** ![carolynquinnxe8z](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carolynquinnxe8z/32/24530_2.png) [@carolynquinnxe8z](https://devforum.zoom.us/u/carolynquinnxe8z)\
**Post date:** [September 17, 2022, 4:03pm UTC](https://devforum.zoom.us/t/unable-to-download-cloud-storage-recording-via-curl-api/73392/3 "2022-09-17T16:03:45Z")

</div>

Have you found a solution to this issue? We also have problems downloading files in our office from the cloud service. We have some important files there, and it would not be good if an error in the system deleted the files. Luckily some of the files are saved with the [https://fastupload.io/en](https://fastupload.io/en). We use this website to share files in our office, and it converts the files into a link, and anyone who has the link can download the files on their computer. We have saved some of the files, but unfortunately, not all of them.

---

<div class="post-metadata">

**Author:** ![nirav.soni](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirav.soni/32/40004_2.png) [@nirav.soni](https://devforum.zoom.us/u/nirav.soni)\
**Post date:** [September 18, 2022, 12:57pm UTC](https://devforum.zoom.us/t/unable-to-download-cloud-storage-recording-via-curl-api/73392/5 "2022-09-18T12:57:07Z")

</div>

Hi,

you can download recorded video from zoom and save in folder using below code. replace your meeting\_id and jwt\_token.

$metting\_id = ‘xxxxx’;

$curl = curl\_init();  
curl\_setopt\_array($curl, array (  
CURLOPT\_URL =\> “[https://api.zoom.us/v2/meetings/“.$metting\_id.”/recordings](https://api.zoom.us/v2/meetings/%22.%24metting_id.%22/recordings)”,  
CURLOPT\_RETURNTRANSFER =\> true,  
CURLOPT\_ENCODING =\> “”,  
CURLOPT\_MAXREDIRS =\> 10,  
CURLOPT\_TIMEOUT =\> 30,  
CURLOPT\_HTTP\_VERSION =\> CURL\_HTTP\_VERSION\_1\_1,  
CURLOPT\_CUSTOMREQUEST =\> “GET”,  
CURLOPT\_HTTPHEADER =\> array(  
“authorization: Bearer YOUR\_JWT\_TOKEN”,  
“cache-control: no-cache”  
),  
));

$response = curl\_exec($curl);  
$err = curl\_error($curl);

curl\_close($curl);

if ($err) {  
echo “cURL Error #:” . $err;  
}  
else {  
$result = json\_decode($response, true);  
$recording\_files = $result[‘recording\_files’];

```
for($i=0; $i<count($recording_files); $i++){

	$src = $recording_files[$i]['download_url'];
	$fileName = $recording_files[$i]['id'].'.mp4';
	$dest = getcwd() . "/videos/" . $fileName;
	$ch = curl_init($src);
	curl_exec($ch);

	if (!curl_errno($ch)) {
	    $info = curl_getinfo($ch);
	    $downloadLink = $info['redirect_url'];
	}

	curl_close($ch);

	if($downloadLink) {
	    copy($downloadLink, $dest);
	}
}

```

}
