This project is currently archived and no longer functional due to changes in the Google Photos API Policy effective March 31, 2025.
Google has restricted API access to "app-created data" only, removing the ability for third-party applications to programmatically access a user's full photo library. As this project relied on broad library access to function, it is no longer possible to maintain it in its current form.
Consuming the Google Photos Library API : Access private Albums and Media Items
Install Git, the free and open source distributed version control system.
Install Node.js which includes Node Package Manager.
Run git clone git@github.com:orbanszlrd/next-google-photos.git to clone the repository from GitHub.
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
- Visit the Google API Console to obtain OAuth 2.0 credentials such as a client ID and client secret that are known to both Google and your application.
GOOGLE_CLIENT_ID=<your-google-client-id>
GOOGLE_CLIENT_SECRET=<your-google-client-secret>
GOOGLE_REFRESH_TOKEN=<your-google-client-refresh-token>
GOOGLE_GRANT_TYPE="refresh_token"
Google Photos APIs - Overview
Google Photos APIs - Resource summary
Google Identity - Using OAuth 2.0 to Access Google APIs
Google Cloud Credentials - APIs & Services
Google Account Settings - Permissions
GitHub - Google APIs Node.js Client
YouTube - Bring the best of Google Photos to your app