> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search and Organize Google Photos With AI Agents

> Let agents search photos, list albums, read metadata, and upload media through the Google Photos API, with OAuth tokens injected by the gateway.

> [!WARNING]
>
> **Per-app Google setup is deprecated.** All Google apps now share one Google OAuth client and one Redirect URI. To use your own client, follow the [Google setup guide](/docs/integrations/google.md). Credentials saved for one Google app apply to all of them.

## Overview

Buckle connects AI agents to Google Photos through Google's OAuth flow. Agents can search for photos and videos, read media metadata, and manage albums. The gateway injects OAuth credentials into requests to the Google Photos Library API automatically.

This is useful for agents that need to find images for content creation, organize photo libraries, or extract metadata from media files.

## What you will set up

* A Google OAuth client shared by every Google app in Buckle
* A Google Photos connection authorized with your Google account
* Automatic token injection on requests to the Google Photos API
* Per-agent, per-tool access to your library

## Connect Google Photos

> [!NOTE]
>
> This applies on Buckle Cloud and self-hosted alike. One Google client serves every Google app in Buckle, so you set it up once. If you already did it for another Google app, skip to step 2.

> [accordion] 1. Set up your Google client
>
> Follow the [Google setup guide](/docs/integrations/google.md). It enables the Google APIs, sets up the consent screen, creates the OAuth client, and adds the Redirect URI.

> [accordion] 2. Connect Google Photos
>
> Open **Settings** > **Apps** > **Google Photos**, select **Connect Google Photos**, pick your Google account, and click **Allow**.
>
> ![Buckle connect window for Google Photos showing Configuration required, the setup guide link, and the Configure credentials button.](https://mintcdn.com/onecli-17d3f772/hJP3XqgFsBDnXHKy/images/integrations/google-photos/buckle-connect-google-photos.png?fit=max\&auto=format\&n=hJP3XqgFsBDnXHKy\&q=85\&s=1eb23296c3d7dd07ef25b19b13401084)
>
> The Google Photos connect window before a Google client is set up.

## What agents can do

* Search for photos and videos by date, category, or content type
* List all media items in the library with pagination
* Read media item metadata (creation time, dimensions, camera info, location)
* Download media item content via base URLs
* Create new albums
* Add media items to albums
* List albums and shared albums
* Read album details (title, cover photo, item count)
* Upload new media items to the library

## Controlling access

Access is per agent: [grant](/docs/guides/agent-access.md) the connection to each agent that needs it, choosing per tool what runs freely, what needs human approval, and what stays blocked — a read-only agent is a single grant. Organization [rules](/docs/guides/rules.md) add guardrails on top, like rate limits and blanket blocks. Everything is checked before credential injection, so a blocked request never reaches Google Photos.

## FAQ

> [accordion] Do I need my own Google client for Google Photos?
>
> Yes. Follow the [Google setup guide](/docs/integrations/google.md) once. One client serves every Google app in Buckle, so if you set it up for another app, skip to connecting.

> [accordion] Does the agent see my Google OAuth token?
>
> No. The token stays in Buckle, and the gateway adds it to Photos API requests at the proxy. See [How it works](/docs/how-it-works.md).

> [accordion] Can an agent browse photos without uploading?
>
> Yes. When you [grant](/docs/guides/agent-access.md) the connection, allow the read tools and block or require approval for uploads and album changes.

> [accordion] How do I reconnect Google Photos?
>
> Open **Settings** > **Apps** > **Google Photos** and connect again. Agents with access use the new connection automatically.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.