Google photos api adding photos to existing album is broken

霸气de小男生 提交于 2019-12-11 16:35:45

问题


Using Googles own "try this api" feature with google photos api. There is a bug with the REST request to add photos to existing albums. Attached a screenshot as proof. I raised this issue here because thats what their support section says to do so please dont downvote. I can add photos directly through the google photos app and thats it.


回答1:


So i figured out why this is happening.

See "Media items can be created only within the albums created by your app. For more information, see Authentication and authorization scopes." from this link: https://developers.google.com/photos/library/guides/upload-media

Google's api wont let you modify an album that was created through another means. In this case i tried modifying albums which i'd created months ago via the UI. Then i was trying to add to those collections via an OAuth2 token using code, postman and eventually googles own api explorer.

My solution was to, in code, create a new album, get its ID and append images to that instead. That was the only way to get a "writable" google album.



来源:https://stackoverflow.com/questions/58738766/google-photos-api-adding-photos-to-existing-album-is-broken

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!