How do I download a publicly shared OneDrive file?

How do I download a publicly shared file (e.g., this)? Preferably without logging in.

I guess you are looking for rclone copyurl


rclone copyurl --progress "" ./your/folder/yourFileName

Does this actually work for you? For me, it just download an HTML page.

You are right, my mistake. You need to use the URL of the video, like this:

rclone copyurl --progress "" ./your/folder/yourFileName

I found it by doing a right click and then "Copy video address" on the video in Google Chrome (Windows).

Any reason why you aren't just using the download option on the OneDrive webpage, or right click on the video and then "save video as"?

I want to automate downloading a batch of OneDrive files. So opening the browser is useless.

I guess that will require some very clever scripting.

The URL to the video doesn't seem to be present in the HTML page, so somebody need to reverse engineer the javascript used by OneDrive to check if it it is possibly find a way to load the right resource and then extract the URL from it. This goes beyond the time that I am prepared to invest.

Perhaps you will get a better answer if asking how to extract the video URL in a forum for javascript developers.

1 Like

I thought that rclone might have already done the heavylifting. I actually found a script that uses Microsoft APIs to get the download links:

Nice script. The API doesn't look too complicated - it is the kind of thing we could put into an rclone backend copypublic onedrive: wherever backend command fairly easily...

1 Like

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