Method: albums.batchRemoveMediaItems
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-07 (世界標準時間)。
[null,null,["上次更新時間:2024-11-07 (世界標準時間)。"],[[["This operation removes one or more media items from a specified album, requiring that both the items and the album were created by the developer via the API."],["Only media items added by the user or the entire album if created by the user can be removed from shared albums."],["The request will entirely fail if any invalid media item or album is specified, as partial success is not supported."],["To use this feature, you need to send a POST request to `https://photoslibrary.googleapis.com/v1/albums/{albumId}:batchRemoveMediaItems`, providing the `albumId` and a list of `mediaItemIds` in the request body."],["Authorization is required with either the `https://www.googleapis.com/auth/photoslibrary` or `https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata` scope."]]],["This outlines the process of removing media items from an album via the Google Photos API. It involves a `POST` request to a specific URL using the `albumId` as a path parameter. The request body, in JSON format, requires an array of `mediaItemIds` which are to be removed. The `mediaItemIds` array must not be empty or contain duplicates, limited to a maximum of 50 IDs. Successful requests result in an empty response body, while failures result in no changes. Authorization requires specific OAuth scopes.\n"]]