- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
HTTP request
GET https://www.googleapis.com/drive/v2/files/{fileId}/export
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| fileId | 
 The ID of the file. | 
Query parameters
| Parameters | |
|---|---|
| mimeType | 
 Required. The MIME type of the format requested for this export. | 
Request body
The request body must be empty.
Response body
If successful, this method returns the file content as bytes. For a list of Google Workspace documents and MIME type conversion formats, see Google Workspace documents and corresponding export MIME types.
Authorization scopes
Requires one of the following OAuth scopes:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.file
- https://www.googleapis.com/auth/drive.meet.readonly
- https://www.googleapis.com/auth/drive.readonly
Some scopes are restricted and require a security assessment for your app to use them. For more information, see the Authorization guide.