> ## Documentation Index
> Fetch the complete documentation index at: https://plai-a079b342.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Facebook Page Media

> This endpoint is used to fetch media assets (both images and videos) associated with a user's Facebook Page. It provides access to the creative library that can be used in ad campaigns, allowing users to browse and select previously uploaded media for their advertisements.

## Request Body

<ParamField body="userId" type="string" required>
  User ID, If not already created, make a user on [create user
  page](/api-reference/endpoint/auth/create_user) first. If already created,
  retrieve the user ID from [get profile
  page](/api-reference/endpoint/auth/get_profile).
</ParamField>

<ParamField body="type" type="string" required>
  Media Type, Values: `IMAGE` or `VIDEO`
</ParamField>

<ParamField body="pagination" type="string" default="">
  If the number of results exceeds the page limit, the response will include
  pagination links (`next` and `previous`) to help you navigate through the
  result set
</ParamField>

## Response

<Tabs>
  <Tab title="Images Response">
    <ResponseField name="success" type="boolean">
      Indicates that the HTTP response was successful (status code 200 OK).
    </ResponseField>

    <ResponseField name="results" type="object">
      <Expandable title="Results Object">
        <ResponseField name="success" type="boolean">
          Indicates whether the specific operation or API action was successful.
        </ResponseField>

        <ResponseField name="media" type="object[]">
          <Expandable title="Media Items">
            <ResponseField name="id" type="string">
              Unique media identifier
            </ResponseField>

            <ResponseField name="full_picture" type="string">
              Picture Link
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="error" type="string">
          Error string if something went wrong
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Tab>

  <Tab title="Videos Response">
    <ResponseField name="success" type="boolean">
      Indicates whether the API request was successful
    </ResponseField>

    <ResponseField name="results" type="object">
      <Expandable title="Results Object">
        <ResponseField name="success" type="boolean">
          Indicates whether the specific operation or API action was successful.
        </ResponseField>

        <ResponseField name="media" type="object[]">
          <Expandable title="Media Items">
            <ResponseField name="id" type="string">
              Unique identifier for the media item
            </ResponseField>

            <ResponseField name="source" type="string">
              Video Source URL
            </ResponseField>

            <ResponseField name="picture" type="string">
              Video Thumbnail Picture
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="error" type="string">
          Error string if something went wrong
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 (IMAGES) theme={null}
  {
      "success":true,
      "results":
          {
              "success":true,
              "media":[
                  {
                      "id":"2074273929752253",
                      "full_picture": "https://scontent-ord5-2.xx.fbcdn.net/v/t45.1600-4/458397097_120212188508890153_5643706261073051043_n.jpg?_nc_cat=105&ccb=1-7&_nc_sid=890911&_nc_eui2=AeEb31a9FMRMAR99chReYC"
                  }
              ]
          }
  }
  ```

  ```json 200 (VIDEOS) theme={null}
  {
      "success":true,
      "results":{
          "success":true,
          "media":[
              {
                  "id": "1361984114970374",
                  "source": "https://scontent-ord5-2.xx.fbcdn.net/o1/v/t2/f2/m69/AQO5UgzvdZxQb-fax-Ej7-_oNuXl9XXa7As55tKAxZXitXRM4tfNrxjQzQoDUJT2626vEbEZ4ArbG4qltgdYeikj.mp4?strext=1&_nc_cat=111&_nc_sid=5e9851&_nc_ht=scontent-ord5-2.xx.fbcdn.net&_nc_ohc=ugKIbHPFh_8Q7kNvgEu8WEl",
                  "picture": "https://scontent-ord5-2.xx.fbcdn.net/v/t15.5256-10/475037280_1986779405162351_2987258282856273552_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=e3495b&_nc_eui2=AeF-GfgvhUPcju8YrI08qVrTg5efafm7pkeDl59p-bumRyJ6hLxDWu9ECoJ1pDLrp7jlWuqdLfmgChl2HKldD5Od&_nc_ohc=hW3y9qSEgXwQ7kNvgFg1LzP"
              }
          ]
      }
  }
  ```
</ResponseExample>
