title: Permanent links to thumbnails in Google Drive API
body: <p>I'm using Google Drive API (PHP) to upload some photos to my Drive. When a file is uploaded, a <code>Google_DriveFile</code> object is returned in the response to confirm the successful transfer. It includes a field called <code>thumbnailLink</code>, accessible through the <code>getThumbnailLink</code> getter. Its content may look like this:</p>
  
  <p><a href="https://lh4.googleusercontent.com/dqVdU195R4_0ZtWxsJlhW1Fr2K30xa2hH3V1KV4UrTBl9QkhOSR0ZqN9HoB-TjEQv8SIJw=s220" rel="noreferrer">https://lh4.googleusercontent.com/dqVdU195R4_0ZtWxsJlhW1Fr2K30xa2hH3V1KV4UrTBl9QkhOSR0ZqN9HoB-TjEQv8SIJw=s220</a></p>
  
  <p>Until today, I was sure that the link doesn't change by itself over time. However, when I tried to display a thumbnail of a photo I have on my Drive, using a cached address I keep in my local database, I got a 403 error - you can see it under the mentioned link. I asked the API for the current link to the thumbnail and it's now completely different.</p>
  
  <p>It happened to me only once but for multiple files, i.e. all the files I had on my Drive suddenly got new thumbnail links.</p>
  
  <p>Is there a way to quickly retrieve a thumbnail of a document (preferably, a photo) by some constant value or to be sure that it won't change? The perfect solution would be to access the thumbnail under a link that includes the document's <code>id</code> instead of some hash that may change.</p>