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 - Forbidden' error page with a message similar to this:
Your client does not have permission to get URL /thumbnailLink from this server.
(Client IP address: clientIP)
Unuthorized User
I try to use the class MediaDownloader.cs provided by Google and I also try to download it by using this code:
using (Stream stream = service.HttpClient.GetStreamAsync(p_DownloadUrl).Result) {
StreamUtilities.Copy(p_WriteDelegate, stream.Read);
}
where 'service' is a DriveService (IClientService) object properly instantiated. I can use it to download the file or make any other requests. I use the 'Drive.Readonly' scope.
I didn't have any issue to download the Thumbnail for a Word, Excel, PDF, etc. documents, because these links are public and doesn't require any kind of authentication.
What I don't do correctly?
Is it possible to download the thumbnail for a Google Docs document?