title: How can I get share and download links from OneDrive API
body: <p>I am using the OneDrive <a href="https://dev.onedrive.com/sdk/js-v7/js-picker-open.htm#advanced-open-scenarios" rel="nofollow">JS Picker</a> and would like to get both a download and share value. The <a href="https://dev.onedrive.com/sdk/js-v7/js-picker-open.htm#example-file-picker-options" rel="nofollow">sample in the documentation</a> lists the options for the <em>action</em> parameter separated by pipes. I was hoping to use bitwise operators to combine those values (e.g. </p>
  
  <pre><code>action: "share | download"
  </code></pre>
  
  <p>but that doesn't seem to allow both the webUrl value and the download url (@microsoft.graph.downloadUrl)... has anybody else been able to do this? Or is there a way to use the share URL (webUrl) to get a download url so we can get the text contents of files?</p>
  
  <p>I know there is a <a href="https://msdn.microsoft.com/en-us/library/dn659726.aspx" rel="nofollow">REST</a> service available though that may be deprecated, given the message at the top of that page: </p>
  
  <blockquote>
    <p>This documentation is archived and is not being maintained.</p>
  </blockquote>
  
  <p>but if that is still usable, perhaps we could use that to download the file... if so, can I put the file id in that download URL and an access token?</p>