2025 年 4 月 1 日,Library API 中的部分範圍已遭到移除。
詳情請參閱這篇文章。
Method: mediaItems.batchGet
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[[["\u003cp\u003eRetrieves a list of media items using their identifiers, returning them in the order provided.\u003c/p\u003e\n"],["\u003cp\u003eAccepts up to 50 media item identifiers in a single request using the \u003ccode\u003emediaItemIds\u003c/code\u003e query parameter.\u003c/p\u003e\n"],["\u003cp\u003eReturns a \u003ccode\u003emediaItemResults\u003c/code\u003e array containing the retrieved media items and any potential errors encountered.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization using specific OAuth scopes for accessing and reading media items, with some scopes undergoing changes as of March 31, 2025.\u003c/p\u003e\n"],["\u003cp\u003eProvides a \u003ccode\u003eMediaItemResult\u003c/code\u003e object for each requested media item, containing either the \u003ccode\u003emediaItem\u003c/code\u003e data or a \u003ccode\u003estatus\u003c/code\u003e object indicating any errors.\u003c/p\u003e\n"]]],["This document details the `batchGet` method for retrieving media items from the Google Photos Library API. It uses a `GET` HTTP request to the specified URL, with `mediaItemIds` as required query parameters, up to 50 at a time. The request body must be empty. The response includes a list of `mediaItemResults`, each containing the requested media item or its access error. The method requires specific authorization scopes. This method will be limited to app created data from March 31, 2025.\n"],null,[]]