URL 매개변수 alt=media를 제공하면 응답의 응답 본문에 파일 콘텐츠가 포함됩니다. 파일이 Drive에 저장된 경우에만 alt=media를 사용하여 콘텐츠를 다운로드할 수 있습니다. Google Docs, Sheets, Slides를 다운로드하려면 대신 files.export를 사용하세요. 자세한 내용은 다운로드 및 내보내기 파일을 참고하세요.
HTTP 요청
GET https://www.googleapis.com/drive/v3/files/{fileId}
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-09-04(UTC)"],[[["Retrieves a file's metadata or content using its ID, with the option to download the content using `alt=media` if stored in Google Drive."],["Accepts various query parameters such as `acknowledgeAbuse`, `supportsAllDrives`, and `includePermissionsForView` to customize the response."],["Requires authorization with one of the specified OAuth scopes, such as `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/drive.readonly`."],["Returns a [File](/drive/api/reference/rest/v3/files#File) object in the response body upon successful execution."],["Uses `GET` request with the endpoint `https://www.googleapis.com/drive/v3/files/{fileId}`, where `{fileId}` is replaced with the actual file ID."]]],["This describes retrieving file metadata or content from Google Drive using a `GET` request to `https://www.googleapis.com/drive/v3/files/{fileId}`. The `fileId` is required as a path parameter. Content can be downloaded by setting `alt=media` as a query parameter. Additional query parameters like `acknowledgeAbuse`, `supportsAllDrives`, and `includeLabels` allow for more specific requests. The request body must be empty. The response body, if successful, is a `File` instance. Several authorization scopes are required.\n"]]