Is there an upload API for Google Photos (photos.google.com)?

57,372

Solution 1

There's an official API for Google Photos now.
It contains an upload media endpoint. That section mentions that all photos uploaded through that endpoint are counted towards the user's storage limit:

Note: All media items uploaded to Google Photos through the API are stored in full resolution at original quality. If your uploads exceed 25MB per user, your application should remind the user that these uploads will count towards storage in their Google Account.

Solution 2

By the looks of it Google Photos is based off the same system Google+ handled photos which was through the Picasa Web Albums Data API.

EDIT: So I came across this question while trying to develop something using Google Photos. Currently I am working on an application that will transfer stuff from Dropbox over to Google Photos.

I can confirm that Google Photos does indeed use Picasa Web Albums API. The API is simply a data storage for anything related to Photos. Drive and Google+ make use of the Data API to persist photos. Looking at picasaweb.google.com you can see it redirects you to Google+ and shows a collection of all of your photo.

You can actually experiment by looking over the Protocol Guide You can further experiment by using the OAuth 2.0 Playground through the Picasa API.

Solution 3

I figured it out using Fiddler against the Google Photos Uploader and toggling the resolution level back and forth.

If you use the mediaBackground upload, it has a parameter for "storage". If you set the parameter to "standard", it is unlimited quota. If you set it to "full", it is against your quota.

So the API Call for full-res quota photos is:

/resumable/upload/plus/v1whitelisted/mediasets/me.cinstant/mediaBackground?uploadType=resumable&imageSize=1024&mediaType=photo&storage=**full**&remainingMediaCount=111

While the API call for standard-res (up to 16 megapixel) unlimited photos is:

/resumable/upload/plus/v1whitelisted/mediasets/me.cinstant/mediaBackground?uploadType=resumable&imageSize=1024&mediaType=photo&storage=**standard**&remainingMediaCount=111

Solution 4

There is no API or other solution that uploads against the unlimited quota. Even if the user selects "use high quality, unlimited uploads", uploading any photos through the Picasa Web Albums Data API will count against the storage.

Share:
57,372
Matthew Simoneau
Author by

Matthew Simoneau

Find me here: Matthew J. Simoneau's Weblog LinkedIn Facebook Twitter Google+ Flickr

Updated on July 07, 2020

Comments

  • Matthew Simoneau
    Matthew Simoneau almost 4 years

    Does the Google Photos app, released on May 28, 2015, have an API which allows uploading of photos? The app seems to build on Picassa and Google+. Can one of their APIs can be used to upload into Google Photos?