ดาวน์โหลดสื่อที่อัปโหลด แต่จะไม่ดาวน์โหลดไฟล์ Google ไดรฟ์ รองรับการดาวน์โหลดใน URI /v1/media/{+name}?alt=media หากต้องการส่งออกไบต์จากไฟล์ Google ไดรฟ์ โปรดดูวิธีการ files.export ใน Google ไดรฟ์
คำขอ HTTP
GET https://chat.googleapis.com/v1/media/{resourceName=**}
[[["เข้าใจง่าย","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-11-05 UTC"],[[["Downloads uploaded media, excluding Google Drive files, using the `/v1/media/{+name}?alt=media` URI."],["To download, use a GET request specifying the media's resource name in the URL path."],["The response provides the file content as bytes, supporting partial downloads via the `Range` header."],["Authorization requires a Chat scope like `chat.bot`, `chat.messages`, or `chat.messages.readonly`."]]],["The core functionality involves downloading uploaded media via a `GET` HTTP request to `/v1/media/{resourceName}`. The `resourceName` path parameter specifies the media to download. The request body must be empty. A successful response returns the file content as bytes. Partial downloads are supported using the `Range` header. Access requires specific OAuth scopes: `chat.bot`, `chat.messages`, or `chat.messages.readonly`. Google Drive files utilize a separate files.export method.\n"]]