Pages

Tuesday, October 26, 2021

2021 Pro Tip : Convert OneDrive Share Link to Download Link

Update for 2024 Metadata Consulting [dot] ca: OneDrive Direct Download Link Generator for 2024 Breaking API Change

Here's how to convert OneDrive Share Link to a instant download link. This follows from my original post in 2014 when I first discovered this trick.


  1. Click on desired file and click Share (at Top) to reveal Copy link button. Click. 



  2. This will reveal Microsoft shortened URL to the file. Copy.



  3. Goto https://unshorten.me/ or similar service and paste link e.g.
    https://1drv.ms/u/s!AsRPggdGwZFcjWhqmIY9K_tzLnQI?e=1o1vOQ
    to get expanded URL.




  4. Copy destination URL and change /redir? to /download?

    For example, 

    https://onedrive.live.com/redir?resid=5C91C14607824FC4!1768&authkey=!AGqYhj0r-3MudAg&e=1o1vOQ

    to 

    https://onedrive.live.com/download?resid=5C91C14607824FC4!1768&authkey=!AGqYhj0r-3MudAg&e=1o1vOQ


  5. Use this link for an instant direct download of the shared file. This buy passes the preview pane in OneDrive.com. Done.




4 comments:

  1. Is there an explanation how does the script convert this url?

    ReplyDelete
  2. How can I download folders from sharepoint?

    ReplyDelete
    Replies
    1. https://support.microsoft.com/en-us/office/download-files-and-folders-from-onedrive-or-sharepoint-5c7397b7-19c7-4893-84fe-d02e8fa5df05

      Delete