I am working on an app using Google Drive. I want the user to be able to share files by link, setting the permissions to anyone and withLink as des
You can use the alternateLink property in the File resource to get a link that can be shared for opening the file in the relevant Google editor or viewer:
https://developers.google.com/drive/v2/reference/files
[With API V3](https://developers.google.com/drive/api/v3/reference/files it is suggested to use the webViewLink property.