Using Google Photos got a little bit more difficult. To connect to the Google Photos API you need to create a new project in the Google Developer console.
For the free version there is a limit of 30 visible photos per album in the front end. Event Gallery Extended allows to show more than 30 photos per album.
Please check the videos above for the whole process. In summary, you need to go through those steps:
- Open the Google Developer Console (Google Developer Console) and sign in.
- Click the project selector in the top toolbar and create a new project
- Enable the Photos Library API. Click the Enable APIs and Services button, search for the Photos Library API, click the tile and hit the Enable button.
- Configure the consent screen: select external user type and create the screen. Add the app name and your domains. No need to select any scopes, but please add the email address of the user with the Google Photos albums. We will not validate this app, but you need to put it to production mode. The validation is unnecessary, but it restricts the number of potential users. This does not matter, since you are the only user of this app. Everything else is handled in Event Gallery. Check the review page and go back to the dashboard.
- Now we need to create the credentials. Click the create credentials button and select OAuth client ID.
- Now we have the credentials and need to add them in the Event Gallery configuration
- Use the refresh token-button. Before you start, the program will tell you the redirect URL. Please add this to your OAuth 2.0-Client credentials. If you don’t do this, you’ll see a redirect_uri_mismatch error message.
On the Event edit page, you need to select the folder type Google Photos. An account selection drop-down and an album selector button will appear. Select the Google Photos Account you want to use and click it to see your Google Photos albums.
A list of albums for the selected Google Photos Account will appear. Now select one of the albums.
Don’t forget to publish this event and hit the save button and you’re done.
By default, the Google Photos API is limited to 10.000 requests per day. That might sound much, but it is not. Since every image URL in the response is valid for 60 minutes or less, Event Gallery needs to request album data multiple times per hour. Let us assume every 10 minutes. With ongoing traffic for 24 hours on your site, this is 144 requests per day. With 50 albums we’re already at 7.200. So keep an eye on the API usage. If you reach the limit, no images will appear until the next day.
I noted that you can verify your project by Google. If I briefly read through the API policy, I see, that you should not create a clone of Google Photos. Well, it depends on how one thinks about your site, but getting the verification might get tricky. If you have other experiences, please let me know.
The image URLs Google delivers are only valid for 60 minutes. The number of API requests is limited. For every shared or sold image, a separate request is necessary to get the latest image URL. This might trigger the API limits.