AI-generated Key Takeaways
-
The Google Photos Library API allows developers to manage photos, videos, and albums programmatically using REST resources.
-
Developers can create, update, and delete albums; add and remove media items; and share albums with others using specific endpoints.
-
Media items can be created, retrieved, updated, searched, and listed using the API, enabling comprehensive media management functionalities.
-
Shared albums can be retrieved, joined, and left using designated endpoints, providing functionalities for collaborative photo sharing experiences.
-
All API requests are relative to the base service endpoint:
https://photoslibrary.googleapis.com
.
Manage photos, videos, and albums in Google Photos
Service: photoslibrary.googleapis.com
Service endpoint
A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:
https://photoslibrary.googleapis.com
REST Resource: v1.albums
Methods | |
---|---|
addEnrichment |
POST /v1/albums/{albumId}:addEnrichment Adds an enrichment at a specified position in a defined album. |
batchAddMediaItems |
POST /v1/albums/{albumId}:batchAddMediaItems Adds one or more media items in a user's Google Photos library to an album. |
batchRemoveMediaItems |
POST /v1/albums/{albumId}:batchRemoveMediaItems Removes one or more media items from a specified album. |
create |
POST /v1/albums Creates an album in a user's Google Photos library. |
get |
GET /v1/albums/{albumId} Returns the album based on the specified albumId . |
list |
GET /v1/albums Lists all albums shown to a user in the Albums tab of the Google Photos app. |
patch |
PATCH /v1/albums/{album.id} Update the album with the specified id . |
share |
POST /v1/albums/{albumId}:share Marks an album as shared and accessible to other users. |
unshare |
POST /v1/albums/{albumId}:unshare Marks a previously shared album as private. |
REST Resource: v1.mediaItems
Methods | |
---|---|
batchCreate |
POST /v1/mediaItems:batchCreate Creates one or more media items in a user's Google Photos library. |
batchGet |
GET /v1/mediaItems:batchGet Returns the list of media items for the specified media item identifiers. |
get |
GET /v1/mediaItems/{mediaItemId} Returns the media item for the specified media item identifier. |
list |
GET /v1/mediaItems List all media items from a user's Google Photos library. |
patch |
PATCH /v1/mediaItems/{mediaItem.id} Update the media item with the specified id . |
search |
POST /v1/mediaItems:search Searches for media items in a user's Google Photos library. |