0
votes

I'm trying to use the Google Drive API to export a Google form (mime type 'application/vnd.google-apps.form') to some other format. The API I'm using is this (one example):

https://www.googleapis.com/drive/v3/files/fileId/export?mimeType=text/html

I found this documentation for the available export formats: https://developers.google.com/drive/api/v3/ref-export-formats

I've tried just about all of the mimeType outputs listed there, none work - I get http error 400. Note that export does work fine with documents, presentations and spreadsheets. Is there a way to do this?

2

2 Answers

0
votes

It was stated in Google Workspace documents and corresponding export MIME types, that an About resource contains an exportFormats field with a list of all supported export formats supported by the system for this user.

You can use about.get method to get an About resource.

Sample Response:

"application/vnd.google-apps.form": [
   "application/zip"
  ],
  • The only supported export format for Google Forms is a zip format based on my About resource

Sample Export Request: (Google Forms to a zip file)

enter image description here

0
votes

On the contrary I am finding ways to get an error response for any request. I am sending the request to Google Drive. Can you provide the code snip or steps on how you get an error.

I have asked my question here. how to reproduce 415 Unsupported Media type

Tried resumable upload with initial w/o MIME type and with return URL, tried many MIME types. All the request go well.