Google Photos API : Auto backup photos

485 Views Asked by At

The Picasa API returns an album called "Auto Backup" which contains all media not associated with an album.

I am unable to fetch "Auto Backup" photos using the new Google Photos API. My scope is set to "https://www.googleapis.com/auth/photoslibrary.readonly". I have 25 albums in total and pageSize set to 50 when I make a call to the "https://photoslibrary.googleapis.com/v1/albums" endpoint.

Any other way like using filters to fetch all media not associated with an album?

Thanks!!

1

There are 1 best solutions below

0
On BEST ANSWER

You can use the mediaItems.list call to retrieve all media items that are in a Google Photos library. This includes all photos and videos that are not associated with an album, but also those that are part of an album.

Per the list library contents developer guide describing this call:

You can list all the media items from the user's Google Photos library. It excludes archived and deleted items. (...) If the user has not added an item available in the Sharing tab of their Google Photos to their library, that item is not included in this list.

Unfortunately, there is currently no call that only returns media items that have not been added to an album.