Google Photos Library Shared Albums API

The SharedAlbums API from Google Photos Library — 4 operation(s) for sharedalbums.

GitHub OpenAPI
Business capability
Photo & Image Libraries AE-170.30

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v1/sharedAlbums/{sharedAlbumsId} Open a shared album by share token · Get sharedAlbums #
Ask an LLM
“How do I open a shared album when I only have its share token?”
“Can I get the details of a shared album from its share token?”
Tell an agent
Open shared album {sharedAlbumsId}.
Get the shared album with share token {sharedAlbumsId}.
POST /v1/sharedAlbums:join Join a shared album · Join sharedAlbums #
Ask an LLM
“How do I join a shared album I was invited to?”
“Can I accept a shared album invite by its share token?”
Tell an agent
Join the shared album with share token {shareToken}.
Accept the shared album invite {shareToken}.
POST /v1/sharedAlbums:leave Leave a shared album · Leave sharedAlbums #
Ask an LLM
“How do I leave a shared album I joined?”
“Can I exit a shared album I'm not the owner of?”
Tell an agent destructive · confirm first
Leave the shared album with share token {shareToken}.
Exit the shared album {shareToken}.
GET /v1/sharedAlbums List shared albums · List sharedAlbums #
Ask an LLM
“Which shared albums appear in my Sharing tab?”
“Can I list only albums created by my app?”
Tell an agent
List my shared albums.
List shared albums, excluding non-app-created data: {excludeNonAppCreatedData}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-photos:google-photos-sharedalbums-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-photos-sharedalbums-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Photos Library Shared Albums API
  version: v1
  description: Generated from Google's published Discovery document for Photos Library API (photoslibrary v1, revision 20261110). 4 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://photoslibrary.googleapis.com
tags:
- name: SharedAlbums
paths:
  /v1/sharedAlbums/{sharedAlbumsId}:
    get:
      operationId: photoslibrary.sharedAlbums.get
      summary: Get sharedAlbums
      description: '*Beginning March 31, 2025, this method will no longer work. Some or all of the scopes previously used for this method are being removed. Please see Photos APIs updates for more details.* Returns the album based on the specified `shareToken`.'
      parameters:
      - name: sharedAlbumsId
        in: path
        required: true
        description: Resource name segment (sharedAlbumsId).
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Album'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/photoslibrary.sharing
      - apiKey: []
      tags:
      - SharedAlbums
  /v1/sharedAlbums:join:
    post:
      operationId: photoslibrary.sharedAlbums.join
      summary: Join sharedAlbums
      description: Joins a shared album on behalf of the Google Photos user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JoinSharedAlbumRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JoinSharedAlbumResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/photoslibrary.sharing
      - apiKey: []
      tags:
      - SharedAlbums
  /v1/sharedAlbums:leave:
    post:
      operationId: photoslibrary.sharedAlbums.leave
      summary: Leave sharedAlbums
      description: Leaves a previously-joined shared album on behalf of the Google Photos user. The user must not own this album.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeaveSharedAlbumRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaveSharedAlbumResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/photoslibrary.sharing
      - apiKey: []
      tags:
      - SharedAlbums
  /v1/sharedAlbums:
    get:
      operationId: photoslibrary.sharedAlbums.list
      summary: List sharedAlbums
      description: Lists all shared albums available in the Sharing tab of the user's Google Photos app.
      parameters:
      - name: excludeNonAppCreatedData
        in: query
        required: false
        description: If set, the results exclude media items that were not created by this app. Defaults to false (all albums are returned). This field is ignored if the photoslibrary.readonly.appcreateddata scope is used.
        schema:
          type: boolean
      - name: pageSize
        in: query
        required: false
        description: Maximum number of albums to return in the response. Fewer albums might be returned than the specified number. The default `pageSize` is 20, the maximum is 50.
        schema:
          type: integer
          format: int32
      - name: pageToken
        in: query
        required: false
        description: A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `listSharedAlbums` request.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSharedAlbumsResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/photoslibrary
        - https://www.googleapis.com/auth/photoslibrary.readonly
        - https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata
      - apiKey: []
      tags:
      - SharedAlbums
components:
  schemas:
    ShareInfo:
      type: object
      properties:
        sharedAlbumOptions:
          $ref: '#/components/schemas/SharedAlbumOptions'
          description: Options that control whether someone can add media items to, or comment on a shared album.
        shareToken:
          description: A token that is used to join, leave, or retrieve the details of a shared album on behalf of a user who isn't the owner. A `shareToken` is invalidated if the owner turns off link sharing in the Google Photos app, or if the album is unshared.
          type: string
        isJoined:
          description: True if the user is joined to the album. This is always true for the owner of the album.
          type: boolean
        shareableUrl:
          type: string
          description: A link to the shared Google Photos album. Anyone with the link can view the contents of the album, so it should be treated with care. The `shareableUrl` parameter is only returned if the album has link sharing turned on. If a user is already joined to an album that isn't link-shared, they can use the album's [`productUrl`](https://developers.google.com/photos/library/reference/rest/v1/albums#Album) to access it instead. A `shareableUrl` is invalidated if the owner turns off link sharing in the Google Photos app, or if the album is unshared.
        isOwned:
          type: boolean
          description: True if the user owns the album.
        isJoinable:
          description: True if the album can be joined by users.
          type: boolean
      description: Information about albums that are shared. This information is only included if you created the album, it is shared and you have the sharing scope.
    LeaveSharedAlbumResponse:
      description: Response to successfully leaving the shared album on behalf of the user.
      properties: {}
      type: object
    JoinSharedAlbumRequest:
      properties:
        shareToken:
          description: Required. Token to join the shared album on behalf of the user.
          type: string
      description: Request to join a shared album on behalf of the user. This uses a shareToken which can be acquired via the shareAlbum or listSharedAlbums calls.
      type: object
    Album:
      description: Representation of an album in Google Photos. Albums are containers for media items. If an album has been shared by the application, it contains an extra `shareInfo` property.
      properties:
        isWriteable:
          description: '[Output only] True if you can create media items in this album. This field is based on the scopes granted and permissions of the album. If the scopes are changed or permissions of the album are changed, this field is updated.'
          type: boolean
        title:
          description: Name of the album displayed to the user in their Google Photos account. This string shouldn't be more than 500 characters.
          type: string
        coverPhotoMediaItemId:
          type: string
          description: Identifier for the media item associated with the cover photo.
        productUrl:
          description: '[Output only] Google Photos URL for the album. The user needs to be signed in to their Google Photos account to access this link.'
          type: string
        id:
          description: Identifier for the album. This is a persistent identifier that can be used between sessions to identify this album.
          type: string
        shareInfo:
          $ref: '#/components/schemas/ShareInfo'
          description: '[Output only] Information related to shared albums. This field is only populated if the album is a shared album, the developer created the album and the user has granted the `photoslibrary.sharing` scope.'
        mediaItemsCount:
          format: int64
          description: '[Output only] The number of media items in the album.'
          type: string
        coverPhotoBaseUrl:
          type: string
          description: '[Output only] A URL to the cover photo''s bytes. This shouldn''t be used as is. Parameters should be appended to this URL before use. See the [developer documentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls) for a complete list of supported parameters. For example, `''=w2048-h1024''` sets the dimensions of the cover photo to have a width of 2048 px and height of 1024 px.'
      type: object
    ListSharedAlbumsResponse:
      properties:
        nextPageToken:
          description: Output only. Token to use to get the next set of shared albums. Populated if there are more shared albums to retrieve for this request.
          type: string
        sharedAlbums:
          description: Output only. List of shared albums.
          items:
            $ref: '#/components/schemas/Album'
          type: array
      description: List of shared albums requested.
      type: object
    LeaveSharedAlbumRequest:
      description: Request to leave a shared album on behalf of the user. This uses a shareToken which can be acquired via the or listSharedAlbums or getAlbum calls.
      properties:
        shareToken:
          type: string
          description: Required. Token to leave the shared album on behalf of the user.
      type: object
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    JoinSharedAlbumResponse:
      description: Response to successfully joining the shared album on behalf of the user.
      properties:
        album:
          $ref: '#/components/schemas/Album'
          description: Shared album that the user has joined.
      type: object
    SharedAlbumOptions:
      description: Options that control the sharing of an album.
      properties:
        isCollaborative:
          description: True if the shared album allows collaborators (users who have joined the album) to add media items to it. Defaults to false.
          type: boolean
        isCommentable:
          description: True if the shared album allows collaborators (users who have joined the album) to add comments to the album. Defaults to false.
          type: boolean
      type: object
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/photoslibrary.readonly: View your Google Photos library
            https://www.googleapis.com/auth/photoslibrary: See, upload, and organize items in your Google Photos library
            https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata: Edit the info in your photos, videos, and albums created within this app, including titles, descriptions, and covers
            https://www.googleapis.com/auth/photoslibrary.sharing: Manage and add to shared albums on your behalf
            https://www.googleapis.com/auth/photoslibrary.appendonly: Add to your Google Photos library
            https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata: Manage photos added by this app
externalDocs:
  url: https://developers.google.com/photos/
x-provenance:
  method: harvested
  publisher: Google
  source: https://photoslibrary.googleapis.com/$discovery/rest?version=v1
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261110)