AI-generated Key Takeaways
-
This method adds one or more media items to a specified album in a user's Google Photos library, provided the media items and albums were created by the developer via the API.
-
Up to 50 media items can be added in a single request, and albums can hold a maximum of 20,000 media items; the request will fail if an invalid media item or album is specified.
-
The media items are added to the end of the album in the order specified and must be in the user's library.
-
Authorization is required, and beginning March 31, 2025, functionality will be limited to interacting with media items created by your app due to scope changes.
Adds one or more app created media items in a user's Google Photos library to an app created album. The media items and albums must have been created by the developer via the API.
Media items are added to the end of the album. If multiple media items are given, they are added in the order specified in this call.
Each album can contain up to 20,000 media items.
Partial success is not supported. The entire request will fail if an invalid media item or album is specified.
HTTP request
POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:batchAddMediaItems
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 |
Response body
If successful, the response body is empty.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/photoslibrary.appendonly
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata