title: Google Drive API get file Edit URL
body: <p>As of 04/20/2015 the Google Documents API v3.0 is deprecated, and will no longer function function on and after this date. So anyone using this API must switch to use the Google Drive API.</p>
  
  <p>I have integrated the Google Drive API into my PHP application, but I can not find how to get a EDIT url for a file I have created or uploaded. Previously in the Google Documents API after uploading a file, the response would return a edit url that would be a direct url to edit the file.</p>
  
  <p>I am using a service account that uses a generated key by my google developers account at <a href="https://console.developers.google.com" rel="nofollow">https://console.developers.google.com</a>. This means my application is making calls on behalf of my service account the developer account has created for me. A google drive service account CAN NOT be accesses by the Drive UI, because as a user you can not login to the account as you would a personal google account.</p>
  
  <p>What I have done is shared my documents I have uploaded or created with my personal account, and the url google returns in the call is named "alternateLink" and it is formatted as such:
  <a href="https://docs.google.com/file/d/0B0nkjw07ekP9LUpuZG4tOHcxdkE/edit?usp=drivesdk" rel="nofollow">https://docs.google.com/file/d/0B0nkjw07ekP9LUpuZG4tOHcxdkE/edit?usp=drivesdk</a></p>
  
  <p>However when logged into the account I shared the above file with, it just goes to a viewer and not the "Google Docs Editor"</p>
  
  <p><strong>How can I get a file's edit link with Google Drive API?</strong></p>