title: Google Drive API: How to get a sharable link to Google docs? (alternateLink, webViewLink return null)
body: <p>I referred to <a href="https://stackoverflow.com/questions/13664084/webviewlink-is-empty-null-when-using-php-code-sample">this posting</a> and <a href="https://stackoverflow.com/questions/13652364/not-receiving-webviewlink-in-response">this posting</a>, still clueless as to how to get a link to a <code>Google Doc</code>.</p>
  
  <p><a href="https://developers.google.com/drive/v3/reference/files#resource" rel="nofollow noreferrer">According to the offical document, </a> <code>webViewLink</code> is "A link for opening the file in a relevant Google editor or viewer in a browser". However, it doesn't return anything but <code>null</code>, while other properties, such as id or mimeType, return expected values. (<code>webContentLink</code> returns <code>null</code> too.) </p>
  
  <p>I could simply use this URL, <code>https://drive.google.com/open?FILE_ID_HERE</code>, but I'm not sure this works in other people's browser.</p>
  
  <p>I'd appreciate any advice!</p>