roopakv / google-photos

Library to make hitting the Google Photos api easy
MIT License
56 stars 22 forks source link

How to find the "albumID" manually? #34

Closed cedricdelpoux closed 4 years ago

cedricdelpoux commented 4 years ago

Hello

If I copy the albumID in a Google Photos url https://photos.google.com/album/ALBUM_ID and I request a album with:

const photos = new GooglePhotos(access_token);
const response = await photos.albums.get(ALBUM_ID);

I have an error Bad Request

The only way I found is to list before my albums and get the ID from the response:

const albums = await photos.albums.list(1)
const response = await photos.albums.get(albums[0].id);

It's not ideal. Is there a way to found the album ID manually? I want to query only specific albums.

Thank you

roopakv commented 4 years ago

@cedricdelpoux Sadly this is not something this library can fix. The google photos web app URL doesn't use the album ID but rather some other internal ID.

Since this ID is never returned in responses that makes it harder. Your best bet is to use the list API once to find all the albums you need by name.

If you think there is an API we can use or something that we can implement in this library to make it easier please let me know.

cedricdelpoux commented 4 years ago

Good to know. Thank you for your answer

ruifortes commented 2 years ago

Hi. I'm using ShareX and currently trying to configure host connections. In this case for Google Photos. ShareX asks for a Album ID . Can I get this ID from Google Photos? As a user, not an hacker?