Retrieve photos for a specific album

GET /album/getPhotos

Retrieves the photos in an album. A photo can be an image, live photo, or video.

Query parameters

  • albumId string Required

    ID of the album to retrieve preview photos for

  • filterLabel string

    Filter photos by a specific public label (case-sensitive, exact match)

    Minimum length is 1, maximum length is 40.

  • filterRestrictedLabel string

    Filter photos by a specific restricted label (case-sensitive, exact match). Requires admin access to the album.

    Minimum length is 1, maximum length is 40.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data array[object] Required
      Hide data attributes Show data attributes object
      • photoId string Required
      • width integer
      • height integer
      • originalUrl string Required

        A signed URL to access the uploaded image. For videos, this is a thumbnail image.

      • stableUrl string Required

        A signed URL to access the stable version of the image (JPEG or WebP, <15 MB) or a thumbnail of the video (JPEG or WebP, <15 MB)

      • videoUrl string

        A signed URL to access the originally uploaded video. Only present if the photo is a video or live photo.

      • downloadUrl string Required

        A signed URL to download the original file (image or video) as it was uploaded. This URL is either the originalUrl or originalVideoUrl, depending on the media type.

      • labels array[string]

        The labels associated with the photo

      • restrictedLabels array[string]

        The labels associated with the photo that are hidden from non-admin users

    • warnings array[string]
  • 404

    Album not found

GET /album/getPhotos
curl \
 --request GET 'https://public-api.joinswsh.com/album/getPhotos?albumId=22222222-2222-2222-2222-222222222222' \
 --header "x-api-key: $API_KEY"
Response examples (200)
{
  "data": [
    {
      "photoId": "string",
      "width": 42,
      "height": 42,
      "originalUrl": "string",
      "stableUrl": "string",
      "videoUrl": "string",
      "downloadUrl": "string",
      "labels": [
        "string"
      ],
      "restrictedLabels": [
        "string"
      ]
    }
  ],
  "warnings": [
    "Example warning"
  ]
}