AI-generated Key Takeaways
-
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 thealbumId
and a list ofmediaItemIds
in the request body. -
Authorization is required with either the
https://www.googleapis.com/auth/photoslibrary
orhttps://www.googleapis.com/auth/photoslibrary.edit.appcreateddata
scope.
Removes one or more app created media items from a specified app created album. The media items and the album must have been created by the developer via the API.
Partial success is not supported. The entire request will fail and no action will be performed on the album if an invalid media item or album is specified.
HTTP request
POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:batchRemoveMediaItems
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
albumId |
Required. Identifier of the |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "mediaItemIds": [ string ] } |
Fields | |
---|---|
mediaItemIds[] |
Required. Identifiers of the Must not contain repeated identifiers and cannot be empty. The maximum number of media items that can be removed in one call is 50. |
Response body
If successful, the response body is empty.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata