Google drive : redirect_uri_mismatch

The URI urn:ietf:wg:oauth:2.0:oob is a special URI used to identify out-of-browser applications, i.e. non-web applications (desktop, mobile, command line, etc.). When you create the credentials in the APIs Console, make sure you select “Installed Application” as the application type and the redirect URI will automatically be set as urn:ietf:wg:oauth:2.0:oob and prevent the “redirect_uri_mismatch” when making … Read more

Google Docs viewer returning 204 responses, no longer working, alternatives?

I run a service that also relies on embedding the Google Doc Viewer and I have also encountered this issue. I could not find any other comparable service (free or otherwise). I have come up with a ‘hack’ that can help you get away with using the Google Doc Viewer. It does require JQuery though. … Read more

User disconnecting app in Drive causes loss of data under FILE scope

The first issue is: A user revokes authorization via: Settings > Manage Apps > Disconnect From Drive Then reauthorizes that App Files this App was authorized to see with DRIVE_FILE scope are no longer authorized. This is the expected behavior of the REST and Android APIs. We don’t think users would intuitively expect all previously … Read more

Deleted files status unreliably reported in the new Google Drive Android API (GDAA)

While waiting for any acknowledgement from the support team, I devised a HACK that allows a workaround for this problem. Using the same principle as in SO 22295903, the logic involves falling back to RESTful API. Basically, dropping the LIST / QUERY functionality of GDAA. The high level logic is: query the RESTful API to … Read more

Google Drive mime-types listing? [closed]

$mime_types= array( “xls” =>’application/vnd.ms-excel’, “xlsx” =>’application/vnd.openxmlformats-officedocument.spreadsheetml.sheet’, “xml” =>’text/xml’, “ods”=>’application/vnd.oasis.opendocument.spreadsheet’, “csv”=>’text/plain’, “tmpl”=>’text/plain’, “pdf”=> ‘application/pdf’, “php”=>’application/x-httpd-php’, “jpg”=>’image/jpeg’, “png”=>’image/png’, “gif”=>’image/gif’, “bmp”=>’image/bmp’, “txt”=>’text/plain’, “doc”=>’application/msword’, “js”=>’text/js’, “swf”=>’application/x-shockwave-flash’, “mp3″=>’audio/mpeg’, “zip”=>’application/zip’, “rar”=>’application/rar’, “tar”=>’application/tar’, “arj”=>’application/arj’, “cab”=>’application/cab’, “html”=>’text/html’, “htm”=>’text/html’, “default”=>’application/octet-stream’, “folder”=>’application/vnd.google-apps.folder’ ); In addition, here is a list of mime-types specifically pertaining to Google drive (and the google suite): https://developers.google.com/drive/v3/web/mime-types

google drive hosting changes in URL

I found the right thread at google.com to answer this. Here it is: https://productforums.google.com/forum/#!category-topic/drive/mTyJXruRhBg In short, the redirect and prefix is here to stay. It’s for some security thing. All files within the same googledrive folder will be prefixed with the same guid-looking string. That is, provided we use this googledrive url form: googledrive.com/host/{folderID}/FriendlyFilename. Then, … Read more

Using the google drive API to download a spreadsheet in csv format

Update: I have posted another answer that works with the Spreadsheets v4 API. Old Answer: The answer from Alain is correct, but you also need to set the gid=parameter to specify which worksheet to export. For example, if your ‘application/pdf’ export link is like this: docs.google.com/feeds/download/spreadsheets/Export?key=<FILE_ID>&exportFormat=pdf You can just change it to this to download … Read more