PHPackages                             revolution/laravel-google-photos - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. revolution/laravel-google-photos

ActiveLibrary[API Development](/categories/api)

revolution/laravel-google-photos
================================

Google Photos API for Laravel

6.3.0(2mo ago)345.4k↓25%6[1 issues](https://github.com/invokable/laravel-google-photos/issues)MITPHPPHP ^8.3CI passing

Since May 12Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/invokable/laravel-google-photos)[ Packagist](https://packagist.org/packages/revolution/laravel-google-photos)[ GitHub Sponsors](https://github.com/invokable)[ RSS](/packages/revolution-laravel-google-photos/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (52)Used By (0)

Google Photos API for Laravel
=============================

[](#google-photos-api-for-laravel)

[![Maintainability](https://camo.githubusercontent.com/434602776de9dfe8a76811bca8fc4ea5fdff09a8416ab0b21660db38ab19c4fb/68747470733a2f2f716c74792e73682f6261646765732f37306436653031652d366332642d343062612d393835622d3736393832303531366561372f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/invokable/projects/laravel-google-photos)[![Code Coverage](https://camo.githubusercontent.com/4605cad344b9dbf0fb09b7e7ec80b34d16e4e22d21ca6d46aea13e4a3e532cad/68747470733a2f2f716c74792e73682f6261646765732f37306436653031652d366332642d343062612d393835622d3736393832303531366561372f746573745f636f7665726167652e737667)](https://qlty.sh/gh/invokable/projects/laravel-google-photos)[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/invokable/laravel-google-photos)

A Laravel package providing seamless integration with the Google Photos Library API and Google Photos Picker API. Upload photos, manage albums, and interact with Google Photos directly from your Laravel applications.

Overview
--------

[](#overview)

This package enables Laravel applications to:

- **Upload photos** to Google Photos with automatic media item creation
- **Manage albums** - create, list, and update album information
- **List media items** and search through uploaded content
- **Use Google Photos Picker** to let users select photos from their Google Photos library
- **OAuth 2.0 authentication** with proper token management and refresh handling

**Important**: Due to Google Photos API limitations, you can only access and manage content that was uploaded via your application. For accessing existing user photos, use the Google Photos Picker API.

Quick Start
-----------

[](#quick-start)

### 1. Install the Package

[](#1-install-the-package)

```
composer require revolution/laravel-google-photos

php artisan vendor:publish --tag="google-config"
```

### 2. Get Google API Credentials

[](#2-get-google-api-credentials)

1. Visit the [Google Cloud Console](https://developers.google.com/console)
2. Enable **Photos Library API** and **Google Photos Picker API**
    ⚠️ Be careful not to select "Google Picker API" (different from Photos Picker API)
3. Create OAuth 2.0 client credentials
4. Set authorized redirect URIs for your application

### 3. Configure Laravel

[](#3-configure-laravel)

Add to your `config/services.php`:

```
'google' => [
    'client_id'     => env('GOOGLE_CLIENT_ID', ''),
    'client_secret' => env('GOOGLE_CLIENT_SECRET', ''),
    'redirect'      => env('GOOGLE_REDIRECT', ''),
],
```

Edit `config/google.php`:

```
