Arnau Torrent
Arnau Torrent

Reputation: 23

Is it possible to get google photos album sharable url without creating the album?

I'm creating an app to show all the Google Photos albums of an account (like a gallery) and I want everyone to be able to access the album via a link. I create the albums directly in Google Photos and make them public (creating a sharing link).

I already set up the authentication via Oauth2.0 and created a photosLibraryClient. I am able to get all the albums, their ID's, their names, their cover photo, ... But I can just get it's link but not the shareable one (the public).

I read about the sharing options in the API documentation: https://developers.google.com/photos/library/guides/share-media

But, as far as I undertood, you can only retrieve a sharing Url if you created the album via the app.

I'm listing albums like this:

$photosLibraryClient->listAlbums()

I'm not sure if there is any accessible attribute or method that I don't know here...

I also tried to access the ShareInfo:

$albumUrl = $photosLibraryClient->shareAlbum($album->getId())->getShareInfo()->getShareableUrl();

But i get the error:

NO PERMISSION TO SHARE THIS ALBUM SINCE IT WAS NOT CREATED BY THIS APP

Any ideas on what to do?

Upvotes: 1

Views: 1090

Answers (1)

Arnau Torrent
Arnau Torrent

Reputation: 23

It's not possible. In the Google Issue Tracker there's a couple of people asking for this same feature. One issue it's still marked as new though it's from 2019. The other one is closed due to "intended behaviour".

We'll have to wait until more people wants this feature or people at Google decide to make it available. Until then, I'll have to manually add a new record to a DB (with a table made for this single purpose) everytime I upload a new album...

Upvotes: 0

Related Questions