From the Google Photos API documentation, I found that we have the filter for the archived File/Album, but I am not able to find any reference to Archive. Are there any ways to archive the Google Photos through the REST API?
https://developers.google.com/photos/library/guides/apply-filters#archived-state
{
"filters": {
"includeArchivedMedia": true
}
}
The answer is a definite "no", as it currently stands. See the similar question from 2017 about deleting, here: Is it possible to delete a photo or an album created via Google Photos API?
If you examine the page on Authorization Scopes (here: https://developers.google.com/photos/library/guides/authorization) you will find that each scope is for reading, editing or sharing. This does include removing media items from albums, and unsharing albums, though even that it limited to those created via the API.
Related
I want to write an app that fetches a random photo from my Google Photos set of photos using the Google Photos API. This is the new Google Photos, not the old one that was linked to a Google Drive.
In my review of the API Docs, it seems that you can list albums, and perhaps list what the albums contain, but it's not obvious to me how to download a photo itself. Can anyone figure it out?
Try with this API: https://developers.google.com/photos/library/reference/rest/v1/mediaItems/list
It lets you list the photos from your library and returns two parameters, productUrl and baseUrl, that you could use to get the photo.
I'm using the Google Photos Java API to create a small program to access the contents of a pre-existing album. I have been able to get code up and running that can report the album's name, and the media items it contains and so on, but not the text added between photos. I understand that the API considers these texts a form of enrichment and I can see there are functions for adding such enrichments to an album, but is there any way to list the enrichments already in an album? Or otherwise access the text a user has previous added between photos via the platform's desktop browser interface?
Unfortunately the Google Photos Library API does not provide a way to access existing album enrichments when accessing the contents of an album.
This has been filed as a feature request on the issue tracker for the API. You can 'star' it to draw attention to it and be notified of any updates: https://issuetracker.google.com/129050144
Facebook photos that others upload and tag me in are no longer being listed by Graph API Explorer. Previously, my photos were accessible, e.g., using
https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Fphotos%2F&version=v2.12
But, photos I'm tagged in, but didn't upload, are no longer being listed. How can I access these photos using Facebook's Graph API Explorer?
It seems that facebook has tighten up its graph api requirements, causing breaking changes:
Apps can no longer get photo...objects for non-app Users who have been tagged by an app User
The wording doesn't precisely capture your scenario -- apps can no longer get photo objects uploaded by non-app Users that tagged an app user (hence, you cannot access all tags) -- but that's probably a wording issue by facebook.
The issue is that your friends that tagged you in their photos are non-app users. They should install the same app and give it access to the following permissions:
user_friends
user_photos
You need to make sure that you give the app those permission too.
You can see which friends have installed the app by using me/friends, it will list only friends who have installed the app.
In your case, since you are testing with "Graph API explorer application" just point a friend to the Graph API Explorer and ask them to give it the above permissions. After that, you should be able to get photos that you are tagged from this user.
I have Google Photo public album and I want to receive direct links for photos form this album. This links I'll use on my blog web pages. How I can to do it?
P.S.: I know that Picasa Web Albums had this feature.
At this time Google actively changes its image service behavior. Now, there is not any algorithms how to receive direct and permanent links to your shared photos. The URLs are received by the right-button click, like https://lh3.googleusercontent.com/(LONGLONGCODE...)=w800-h600-no, are temporary and live one-two days and then will be closed.
You can try new Google service - Google Archive Album. This service was created as holder for albums from the deleted Picasa service. But it contains photos and albums from Google Photo too. The Google Archive Album have two greats advantages:
links are much shorter the from those of Google Photos,
this links are permanent!
For working with Google Archive Album you need to follow rules:
create standard (NOT PUBLIC) album in Google Photos.
go to Google Archive Album and make sure that you see the new album.
add to album required photos and only now change its type to the public by creating the shared link to it.
again go to Google Archive Album, open your album.
click on first photo.
right-clink on photo image and copy link to the clipboard.
insert received link where you need.
repeat steps 5-7 for others photos.
voilĂ !
But how long time Google Archive Album will working I don't know :(
P.S.: If you don't know - URL links from Google Photos and Google Archive Album can be tuned. For detail reads the special site.
We can choose cat photos taken in a location in the google photos app, but I wonder if there is any API for that?
I did some search and people suggested we can use the old google+ API for upload, but I'm looking into getting a list of photos that match the search.
Or, perhaps to get a list of photos in a given public photo albums?