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

# Google Photos Integration: Albums & Media Access

> Search, browse, and manage photos and albums. Agents can read image metadata, list albums, and upload media via the Photos API.

## Overview

OneCLI 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.

## Setup

<Steps>
  <Step title="Go to Connections">
    Open the OneCLI dashboard and navigate to **Connections** > **Google Photos**.
  </Step>

  <Step title="Authorize">
    Click **Connect Google Photos**. You'll be redirected to Google to authorize OneCLI. Review the permissions and click **Allow**.
  </Step>
</Steps>

## 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 with rules

Use OneCLI's [rules engine](/guides/rules) to limit what agents can do with Google Photos. For example, you can allow read-only access so agents can search and download but not upload or modify albums. Rules are evaluated before credential injection, so a blocked request never reaches Google Photos.
