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

# Get Media

> Fetches media files associated with a specific username. Optionally supports pagination with cursor and size parameters.

<Tip>This API is useful if you are fetching the user's uploaded media at `/username` page.</Tip>


## OpenAPI

````yaml GET /user/media
openapi: 3.0.0
info:
  title: Media API
  version: 1.0.0
  description: API to fetch media files associated with a user.
servers: []
security: []
paths:
  /user/media:
    get:
      summary: Get media files by username
      description: >-
        Fetches media files associated with a specific username. Optionally
        supports pagination with cursor and size parameters.
      parameters:
        - name: username
          in: query
          required: true
          schema:
            type: string
            example: john_doe
          description: The username to fetch media files for.
        - name: cursor
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            The cursor for pagination. Fetches media files starting after this
            cursor.
        - name: size
          in: query
          schema:
            type: integer
            format: int32
            example: 20
          description: The number of media files to return per page.
      responses:
        '200':
          description: A list of media files associated with the username.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          format: int32
                        mediaUrl:
                          type: string
                          format: uri
                        mimeType:
                          type: string
                        postId:
                          type: integer
                          format: int32
                        userId:
                          type: integer
                          format: int32
                      required:
                        - id
                        - mediaUrl
                        - mimeType
                        - postId
                        - userId
                  totalPages:
                    type: integer
                    format: int32
                required:
                  - data
                  - totalPages
        '500':
          description: Error fetching media files.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error

````