আপলোড করা মিডিয়া ডাউনলোড করে, কিন্তু Google ড্রাইভ ফাইল নয়। ডাউনলোড URI /v1/media/{+name}?alt=media তে সমর্থিত। একটি Google ড্রাইভ ফাইল থেকে বাইট রপ্তানি করতে, Google ড্রাইভে files.export পদ্ধতি দেখুন৷
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"]],["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eDownloads uploaded media, excluding Google Drive files, using the \u003ccode\u003e/v1/media/{+name}?alt=media\u003c/code\u003e URI.\u003c/p\u003e\n"],["\u003cp\u003eTo download, use a GET request specifying the media's resource name in the URL path.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides the file content as bytes, supporting partial downloads via the \u003ccode\u003eRange\u003c/code\u003e header.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires a Chat scope like \u003ccode\u003echat.bot\u003c/code\u003e, \u003ccode\u003echat.messages\u003c/code\u003e, or \u003ccode\u003echat.messages.readonly\u003c/code\u003e.\u003c/p\u003e\n"]]],["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"],null,["# Method: media.download\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Media.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nDownloads uploaded media, but not Google Drive files. Download is supported on the URI `/v1/media/{+name}?alt=media`. To export bytes from a Google Drive file, see the [files.export](https://developers.google.com/drive/api/reference/rest/v3/files/export) method in Google Drive.\n\n### HTTP request\n\n`GET https://chat.googleapis.com/v1/media/{resourceName=**}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resourceName` | `string` Name of the media that you are downloading. For more information, see [spaces.messages.attachments.attachmentDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#Attachment.AttachmentDataRef). |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, this method returns the file content as bytes.\n\nTo download only part of a file, use the `Range` header with a [byte range](https://www.rfc-editor.org/rfc/rfc9110.html#name-byte-ranges). For example: `Range: bytes=500-999`.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.bot`\n- `https://www.googleapis.com/auth/chat.messages`\n- `https://www.googleapis.com/auth/chat.messages.readonly`\n\nFor more information, see the [Authorization guide](/workspace/chat/authenticate-authorize)."]]