For all Google Docs, I\'m not able to download the thumbnail image from the ThumbnailLink property returned with a file response.
I always receive a \'403 - Forbidde
We've recently made a change to fix this issue. Please try your code again and see if you are still getting this error. I was able to run the following code to successfully download a thumbnail of my Google Document.
# Get oauth credentials
...
# Authorize an http object
http = httplib2.Http()
http = credentials.authorize(http)
drive_service = build('drive', 'v2', http=http)
# Google Document type ID
docId = '1ns9x5BMIZAeUR-eXerqgpaHBBGkl_-_KCVpVoV5opn8'
files = drive_service.files().get(fileId=docId).execute()
thumbnailLink = files['thumbnailLink']
print 'Downloading thumbnail at: ', thumbnailLink
response, content = http.request(thumbnailLink)
print response.status
with open('thumbnail.jpg', 'wb') as f:
f.write(content)