Witness Chain
  • Introduction to Witness Chain
  • Infinity Watch
    • Proof of Location (Mainnet)
      • Introduction
      • Process flow
      • Architecture
      • Run a watchtower!
        • For Partner node runners
          • Running on Akash Cloud
          • Running on SuperNoderz
        • EigenLayer operators
          • Running a PoL Watchtower
          • Witness Chain AVS opt-in guide
        • At-home watchtowers
        • For DePIN/Validator Node provider
      • Demos
      • PoL Research
    • APIs
      • Campaign APIs
        • Key Terminologies
        • Authentication
        • Create Campaign
        • Edit campaign
        • Get Photo feed from campaign
        • Get Campaigns
      • Challenge APIs
        • Overview
        • Getting Started
  • Resources
    • Blogs
      • How Proof of Location Works
      • Redefining Geolocation Compliance: Witness Chain & Predicate
    • 🗞️Research
    • 🎙️Talks and Podcasts
    • 🤝Community
    • ⚖️Smart Contracts
    • File a bug
  • Archive
    • Introduction
    • Proof of Diligence Watchtower Protocol
      • How it works
      • Diligence Watchtower Roadmap
      • Watchtower Architecture
      • Chains watched
      • Smart Contracts
      • Quick Links
      • FAQs
    • For the node operators
      • Node requirements
      • Watchtower setup
        • [ARCHIVE] Mainnet Setup
          • L2 Archive Node Setup guide
        • Holesky Setup
          • L2 Archive Node Setup guide
        • Migration from archive to full node
      • Monitoring
    • Research
    • Keys Management
    • Proof of Bandwidth
      • Introduction
      • Architecture
      • For the node operators
        • Running a PoB Challenger Client
        • Running a PoB Prover Client
      • Demos
      • Research
    • 🤝Watchtower Protocol (Architecture v1)
      • 🗼How it works
      • 📅Watchtower Roadmap
      • 🏦Watchtower Architecture
      • 🔗Chains supported
Powered by GitBook
On this page
  • Endpoint
  • Request Body
  • Example Request
  • Response
  • Example Response
  • Error Codes
  • Notes
  • Error Codes
  • Notes
  1. Infinity Watch
  2. APIs
  3. Campaign APIs

Get Photo feed from campaign

Retrieves photos associated with a specific campaign by its name.

Endpoint

POST /photo-feed-from-campaign

Before creating a campaign, you must complete the authentication flow using the pre-login and login endpoints.

The documentation for the endpoints can be found at Authentication

Request Body

{
  "type": "object",
  "required": ["campaign"],
  "properties": {
    "campaign": {
      "type": "string",
      "description": "Name of the campaign to retrieve photos for"
    },
    "since": {
      "type": "string",
      "format": "date-time",
      "description": "Retrieve photos posted after this timestamp"
    }
  }
}

Example Request

{
  "campaign": "summer-promotion",
  "since": "2025-01-01T00:00:00Z"
}

Response

{
  "type": "object",
  "properties": {
    "photos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "photo_id": {
            "type": "string",
            "description": "Unique identifier for the photo"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL of the photo"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the photo was uploaded"
          }
        }
      }
    }
  }
}

Example Response

{
  "photos": [
    {
      "photo_id": "photo_123456",
      "url": "https://example.com/photos/123456.jpg",
      "created_at": "2025-06-15T14:30:00Z"
    }
  ]
}

Error Codes

Status Code
Description

400

Bad Request - Invalid parameters

401

Unauthorized - Authentication required

403

Forbidden - Insufficient permissions

404

Not Found - Campaign not found

429

Too Many Requests - Rate limit exceeded

500

Internal Server Error

Notes

  • The since parameter is optional and can be used to filter photos by upload date

  • Photos are returned in chronological order (newest first)

  • If no photos are found, an empty array will be returned

Error Codes

Status Code
Description

400

Bad Request - Invalid parameters

401

Unauthorized - Authentication required

403

Forbidden - Insufficient permissions

404

Not Found - Campaign not found

429

Too Many Requests - Rate limit exceeded

500

Internal Server Error

Notes

  • The request accepts pagination parameters in the request body

  • Photos are returned in paginated format with a default limit of 20 photos per request

  • The thumbnail_url provides a smaller, optimized version of the photo for preview purposes

  • Use the pagination parameters to iterate through all photos in the campaign

  • Photos are sorted by creation date (newest first) by default

  • The response includes metadata about each photo's dimensions and file format

  • The thumbnail_url provides a smaller, optimized version of the photo for preview purposes

  • Use the pagination parameters to iterate through all photos in the campaign

  • Photos are sorted by creation date (newest first) by default

  • The response includes metadata about each photo's dimensions and file format

PreviousEdit campaignNextGet Campaigns

Last updated 3 months ago