Monday, May 5, 2014

How to Get Direct Download Link From OneDrive - WORKING - Power IT Pro Tip

Question
  • Need a direct download link for single file on OneDrive.live.com ? 
  • Do you find the normal OneDrive "Get a link" which bring  you to one drive site an show multiple files a little confusing? (especially for novices)
Solution





Microsoft OneDrive Direct File Download URL Maker



<iframe src="https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ" width="98" height="120" frameborder="0" scrolling="no"></iframe>  see instructions below, if you don't know how. NOTE : For images there an extra step below.

https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ and populate the textbox below, click "Get Download Link" button.



2. Click on Get Download Link button.
Textbox will be highlighted so you can copy the full link. To copy, right-click and choose  "Copy" or simply (ctrl-c) to copy link. Note: Entire URL is automatic selected for your convenience.



 


How to get a Microsoft OneDrive Embed Code (see instructions and images below)



  1. Goto OneDrive (https://onedrive.live.com/)
  2. Upload you file

  3. Right-click to "Embed" your uploaded file 

  4. Click Generate HTML Button.

  5. Copy and Paste HTML Code to Notepad

  6. Copy the all the embed code ie. <iframe src="embed link"... >...</iframe> and paste into textbox here



    Click Get embed link button to get the embed link and copy (ctrl-c).
  7. Paste (crtl-v) the file link into OneDrive Embed Link textbox above and click "Get Download Url" button. Proceed as usual.
  8. Right-click and "Copy" or simply press ctrl-c keys to copy the link to your clipboard.
  9. Now Paste (ctrl-v) the OneDrive Share Direct Download Link in emails to share!
  10. Done!

API Change for Images 



  1. Right-click to "Share" your uploaded file

  2. Pop-up will appear and choose "Get a link", click "Create link" dark blue button.
  3. Right-click and "Copy" the highlighted link.  Updated June 07, 2016 API change.
  4. You should get a similar "shortened" url as this

    https://1drv.ms/i/s!AvOyviiXZJmPlSc1CjtKuwc_gqVu

    Paste into https://www.linkexpander.com/ and copy that URL.


     
  5. Resulting url looks like this  https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2727&authkey=!ADUKO0q7Bz-CpW4&ithint=photo%2cjpg
  6. Paste link into OneDrive Share Link textbox and click "Get Download Url" button.
  7. Right-click and choose "Select all" and "Copy".
  8. Paste the OneDrive Share Direct Download Link in emails instead.
  9. "Shorten link" was a feature in the old API windows now gone, June 07, 2016.  This is done by default now.

  10. OR for image only 
  1. Updated June 07, 2016 API change! Right-click Embed now gives you direct download URL! So you do not need to do the above! 
Google Chrome Warning: Very large PDF files do not preview in Chrome

PDF files approx. over 100Mb in size, do not preview in Chrome, and you get a splash page to "For the best experience, open this PDF portfolio in Adobe Acrobat or Adobe Reader"

You have to save the file first then open in Adobe Acrobat/Reader.






  • https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2737&authkey=!ACnO8wuwLQ07PqI&v=3&ithint=photo%2cgif
It should look something like URL above and must contain the required file id (resid), authentication key (authkey) and file type (ithint). We'll use this link to get a direct file download.





 
OneDrive for Business File Share Link is the download link by default;)


Bonus : For images, read Using OneDrive as a Content Delivery Network (CDN)

38 comments:

  1. The second method, using 'Get a Link' worked for me today, 28 August 2014.

    ReplyDelete
  2. Wow.. that's... not a very good user experience.

    ReplyDelete
  3. The second method, using 'Get a Link' worked for me today, 30. October 2014.

    ReplyDelete
  4. Thx, last method worked for me. Hope it lasts!!!

    ReplyDelete
  5. Bump for love. Download worked with the Get Link edited.

    ReplyDelete
  6. Thanks. The second method still works

    ReplyDelete
  7. Thank you very much , your share post very useful,
    I have problem on my blogspot, then i upload video to Onedrive( skydrive) , i emble code to insert my blogspot , but then i click video file on my blog, inmediate video next page to Onedirve page , that please you tell me should be how hadling?
    Thanks you, my email: nhomthun@gmail.com.

    ReplyDelete
    Replies
    1. http://www.videojs.com/

      You have to embed a video player (such as vidoejs.com) and choose the source of the file from OneDrive using above trick, such as this link

      https://onedrive.live.com/download?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ

      Delete
  8. Neither one is working for me any longer.

    ReplyDelete
    Replies
    1. https://onedrive.live.com/download?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%212780&authkey=AHGTayWelaWRDMA
      Try this link as a test, works for me.

      Delete
  9. OMG. This work great with onedrive webdav hack https://d.docs.live.net/yourliveidcode

    Now i can sync outlook calendar with live calendar

    Thank you

    ReplyDelete
  10. Thanks a lot !!! Both methods are working good just now.

    ReplyDelete
  11. First one worked for me well, saved me a bunch of time, THANKS A LOT!!!

    ReplyDelete
  12. OneDrive do not agree direct download if the file is big. I have video of 1 at 4GB and whoever receives the link will have to register in microsoft. No good!. The little files, no problem. If anybody know a way, tell me jgarciaf@ig.com.br

    ReplyDelete
  13. I have a lot of files over 4GB and work to me but not for my friends. The little files, no problem...

    ReplyDelete
    Replies
    1. As of Sept 2014, Onedrive allows files up to 10G to be uploaded.
      http://www.pcworld.com/article/2605912/onedrive-now-allows-files-of-up-to-10gb.html
      https://onedrive.uservoice.com/forums/262982-onedrive/suggestions/6421614-allow-files-of-any-size-to-be-uploaded-and-synced

      Delete
  14. Worked for me, good since the download link is removed from the OneDrive Web application in Safari on an iPad. Used the embed method, edited it to download? , removed HTML tags, and emailed to myself on the tablet. PDF file opened using "Open in". What a pain in the rear, download function worked directly in Safari last week, no longer.

    ReplyDelete
  15. You are the man!!! Revised version worked for me and first time download from onedrive with full download speed. BIG THX

    ReplyDelete
  16. I just check the box of the file then middle click the Download button at the top so that it creates a new tab and copy that link. Always worked for me

    ReplyDelete
  17. Probably not the best method to create direct links, if you don't want to share your name. Just replace 'download' with 'redir' and you can view the uploader details.

    Unfortunately are real direct links (e.g. https://pabhmw-bn1ap000.files.1drv.com/y3mJ-x4wYVR09Rfvf_8mMMFg8pTMzG_JyrZ91dNpHJkJesy7LTjN4m6pF8eQRtD_sn-S7ZgOFHAZu4FY2vw7D2RA6vK1-B0oE54tmfn75SBlenDcAoCZDY50TaIjFhNGy_7zohm13n2Au0D6Srb1r4Bqg/WMPTaskbarInstaller32.zip) temporarily limited. Except for pictures where no such limitation exists.

    ReplyDelete
    Replies
    1. That is correct, thanks for the security reminder!

      Under the Information twisty folks on the OneDrive preview page for the download, the Added field will pull your full name from the Microsoft Account of the uploaded and then shared file.

      Note: This has always been the case with OneDrive, you can check that Information tab with any share.

      If you use the default share link with the default redir verb (https://onedrive.live.com/redir?resid=8F99649728BEB2F3%212780) you get this information too. Click on the circle-i icon will pull up the same information panel and expose user name and additional file info.

      Onedrive is not a place for anonymous shares.




      Delete
  18. Perfect advice, works like a charm.

    ReplyDelete
  19. The first method presented (extract the address from the html embedding code) worked for me at the time of this writing.

    ReplyDelete
  20. Veryyyyyyyyyyyyyyyy Nice the above 1st trick is 100% working... thanks a lot, carryon bro

    ReplyDelete
  21. But wget of files and folders zipped by OneDrive for downloading is not possible
    wget cid-etcetc.users.storage.live.com/downloadfiles/V1/Zip?authKey=Numbers
    Error 405: Method not allowed

    ReplyDelete
  22. it works very good, but I had problems with the direct processing of a textfile. Very Strange, the ftell php command runs out of control, I guess the line end isn´t accepted well. Now, I first copy the file from onedrive to my Webspace Folder and then process with php, this works absolutely fine

    ReplyDelete
  23. You have to delete this shit too: &authkey=AHGTayWelaWRDMA

    ReplyDelete
  24. Swapping redir? for download? works perfectly, thanks!

    ReplyDelete
  25. Thanks!! This is a fix for a seeming simple and obvious use case to get a link for let people download any file.
    I can't believe OneDrive interface does not make it easy for people to do this.

    ReplyDelete
  26. Is there a way to get a link for direct download without giving the user access to all your other files in your onedrive account..?

    Thanks a lot...

    ReplyDelete
  27. which other way can i get embed link if not one drive.
    someone please help.
    i need another way not onedrive.
    thanks

    ReplyDelete
    Replies
    1. https://send.firefox.com/ this is a new anon service to send files

      Delete