您正在查看 Google Photos Library API 的旧版文档。
Method: albums.batchRemoveMediaItems
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-21。
[null,null,["最后更新时间 (UTC):2024-11-21。"],[[["The API removes one or more media items from a specified album, requiring the media items and album to be created by the developer."],["It supports removing media items from shared albums only if added by the user or if the user created the album."],["Requests must include the `albumId` as a path parameter and an array of `mediaItemIds` in the request body."],["The API follows an all-or-nothing approach, failing the entire request if any specified media item or album is invalid."],["Authorization requires the `https://www.googleapis.com/auth/photoslibrary` scope."]]],["This describes the process to remove media items from an album using the Google Photos Library API. A `POST` request to `https://photoslibrary.googleapis.com/v1/albums/{albumId}:batchRemoveMediaItems` is required, including the `albumId` in the path. The request body, in JSON format, needs an array of `mediaItemIds` to remove, up to 50. This action requires the `https://www.googleapis.com/auth/photoslibrary` OAuth scope. A successful request returns an empty response. If an error occurs, no media items will be removed.\n"]]