Google Photos API limits

Viewed 2853

I'm trying to use the Google Photos API to incrementally upload a very large local photo library.

Everything was working, but after uploading about 1.2GB the requests started being rejected with the following message:

Insufficient tokens for quota 'photoslibrary.googleapis.com/total_upload_bytes' and limit 'UploadBytesPerDay' of service 'photoslibrary.googleapis.com' for consumer 'project_number:XXXXXXXXXXXX'

I checked my Photos Library API quota in the IAM & admin section of the Google Cloud Console and I've only used 80 out of 10,000 daily requests.

I have enough available storage space in Google Photos/Drive and the attempted uploads are fairly small (~5MB).

I'm not seeing anything in the limits and quotes section of the API docs. Does anyone have any idea what might be blocking my requests?

4 Answers

Google API documentations can be really confusing at times, even outdated at some parts. But they did mentioned quota limits in here:

The quota limit for requests to the Library API is 10,000 requests per project per day. Requests to access media bytes (like loading a photo or video) are not counted against the limit.

Exceeding quota limits

If the quota of requests to the Library API is exceeded, the API returns an error code 429 and a message that the project has exceeded the quota. For more information, see the Terms of Service.

Cryptonome, that quota has nothing (apparent) to do with this thread. The error message is about upload bytes, not "requests per day".

Related