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

# Get chat media

> Get media from a chat. Use the `type` query parameter to filter by media type: 'photos', 'videos', or 'audios'. Omit `type` to get all media.

**Permission Required:** `messages:read`



## OpenAPI

````yaml https://api.ofauth.com/openapi.json get /v2/access/chats/:userId/media
openapi: 3.1.0
info:
  title: OFAuth API
  version: 1.0.0
  description: >-
    OFAuth API including Account, Connections, Link, Access, Dynamic Rules,
    Vault+, and Realtime webhook contracts
  contact:
    email: support@ofauth.com
    url: https://ofauth.com/
servers:
  - url: https://api.ofauth.com
security:
  - ApiKey: []
tags:
  - name: Account
    description: Account management endpoints.
  - name: Connections
    description: Connection management endpoints.
  - name: Link
    description: Link authentication and session endpoints.
  - name: Access
    description: All Access related endpoints.
  - name: Analytics
    description: 'Access: charts, tops, and performance metrics.'
  - name: Earnings
    description: 'Access: earnings charts, transactions, and chargebacks.'
  - name: Messages
    description: 'Access: messaging, chats, queue, and mass messaging.'
  - name: Posts
    description: 'Access: create, edit, list, and manage posts.'
  - name: Promotions
    description: 'Access: promotions, trials, and bundles.'
  - name: Users
    description: 'Access: user profiles, subscriptions, and actions.'
  - name: Vault
    description: 'Access: vault folders, media, and management.'
  - name: Upload
    description: 'Access: media upload and processing.'
  - name: Self
    description: 'Access: authenticated account details and settings.'
  - name: Stories
    description: 'Access: stories listing and management.'
  - name: Subscriptions
    description: 'Access: subscription offers, discounts, and management.'
  - name: Realtime
    description: >-
      Realtime webhook delivery contracts, including relayed OnlyFans websocket
      events.
  - name: Dynamic Rules
    description: Dynamic signing rules operations.
  - name: Vault+
    description: Vault+ caching and management.
externalDocs:
  description: OFAuth Developer Documentation
  url: https://docs.ofauth.com
paths:
  /v2/access/chats/:userId/media:
    get:
      tags:
        - Messages
      summary: Get chat media
      description: >-
        Get media from a chat. Use the `type` query parameter to filter by media
        type: 'photos', 'videos', or 'audios'. Omit `type` to get all media.


        **Permission Required:** `messages:read`
      parameters:
        - schema:
            type: string
            pattern: ^\d+$
          required: true
          name: userId
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
            description: 'Number of items to return (1-100, default: 10)'
          required: false
          description: 'Number of items to return (1-100, default: 10)'
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: 'Number of items to skip (default: 0)'
          required: false
          description: 'Number of items to skip (default: 0)'
          name: offset
          in: query
        - schema:
            type: string
            description: Users to skip
          required: false
          description: Users to skip
          name: skip_users
          in: query
        - schema:
            type: string
            nullable: true
            description: Pagination cursor
          required: false
          description: Pagination cursor
          name: last_id
          in: query
        - schema:
            type: string
            enum:
              - '0'
              - '1'
              - 'true'
              - 'false'
            description: Filter by opened status
          required: false
          description: Filter by opened status
          name: opened
          in: query
        - schema:
            type: string
            enum:
              - photos
              - videos
              - audios
            description: Filter by media type
          required: false
          description: Filter by media type
          name: type
          in: query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  list:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        text:
                          type: string
                        fromUser:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: number
                                name:
                                  type: string
                              required:
                                - id
                                - name
                            - type: object
                              properties:
                                id:
                                  type: number
                                _view:
                                  type: string
                              required:
                                - id
                                - _view
                        media:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: number
                              type:
                                type: string
                                enum:
                                  - photo
                                  - video
                                  - gif
                                  - audio
                              convertedToVideo:
                                type: boolean
                              canView:
                                type: boolean
                              hasError:
                                type: boolean
                              createdAt:
                                type: string
                              isReady:
                                type: boolean
                              duration:
                                type: number
                              releaseForms:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: number
                                    name:
                                      type: string
                                    partnerSource:
                                      type: string
                                    type:
                                      type: string
                                    user:
                                      type: object
                                      properties:
                                        view:
                                          type: string
                                        id:
                                          type: number
                                        name:
                                          type: string
                                        username:
                                          type: string
                                        isVerified:
                                          type: boolean
                                        avatar:
                                          type: string
                                        avatarThumbs:
                                          type: object
                                          properties:
                                            c50:
                                              type: string
                                            c144:
                                              type: string
                                          required:
                                            - c50
                                            - c144
                                        ivStatus:
                                          type: string
                                        isFromGuest:
                                          type: boolean
                                      required:
                                        - view
                                        - id
                                        - name
                                        - username
                                        - isVerified
                                        - avatar
                                        - avatarThumbs
                                        - ivStatus
                                        - isFromGuest
                                  required:
                                    - id
                                    - name
                                    - partnerSource
                                    - type
                              hasCustomPreview:
                                type: boolean
                              videoSources:
                                type: object
                                properties:
                                  '240':
                                    type: string
                                    nullable: true
                                  '720':
                                    type: string
                                    nullable: true
                              files:
                                type: object
                                properties:
                                  full:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                      width:
                                        type: number
                                      height:
                                        type: number
                                      size:
                                        type: number
                                      sources:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            url:
                                              type: string
                                            width:
                                              type: number
                                            height:
                                              type: number
                                            type:
                                              type: string
                                          required:
                                            - url
                                    required:
                                      - url
                                      - sources
                                  thumb:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                      width:
                                        type: number
                                      height:
                                        type: number
                                      size:
                                        type: number
                                    required:
                                      - url
                                  preview:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                      width:
                                        type: number
                                      height:
                                        type: number
                                      size:
                                        type: number
                                      options:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            url:
                                              type: string
                                            width:
                                              type: number
                                            height:
                                              type: number
                                            type:
                                              type: string
                                          required:
                                            - url
                                    required:
                                      - url
                                      - options
                                  squarePreview:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                      width:
                                        type: number
                                      height:
                                        type: number
                                      size:
                                        type: number
                                    required:
                                      - url
                                required:
                                  - full
                            required:
                              - id
                              - type
                              - convertedToVideo
                              - canView
                              - hasError
                              - createdAt
                              - isReady
                              - releaseForms
                        isMediaReady:
                          type: boolean
                        mediaCount:
                          type: number
                        previews:
                          type: array
                          items:
                            type: number
                        lockedText:
                          type: boolean
                        responseType:
                          type: string
                        giphyId:
                          type: string
                          nullable: true
                        isFree:
                          type: boolean
                        isTip:
                          type: boolean
                        isReportedByMe:
                          type: boolean
                        isCouplePeopleMedia:
                          type: boolean
                        queueId:
                          type: number
                        isMarkdownDisabled:
                          type: boolean
                        releaseForms:
                          nullable: true
                        isFromQueue:
                          type: boolean
                        canUnsendQueue:
                          type: boolean
                        unsendSecondsQueue:
                          type: number
                        isOpened:
                          type: boolean
                        isNew:
                          type: boolean
                        createdAt:
                          type: string
                        changedAt:
                          type: string
                        cancelSeconds:
                          type: number
                        isLiked:
                          type: boolean
                        canPurchase:
                          type: boolean
                        canPurchaseReason:
                          type: string
                        canReport:
                          type: boolean
                        canBePinned:
                          type: boolean
                        isPinned:
                          type: boolean
                        replyToMessage:
                          type: object
                          properties:
                            id:
                              type: number
                            text:
                              type: string
                            fromUser:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: number
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                - type: object
                                  properties:
                                    id:
                                      type: number
                                    _view:
                                      type: string
                                  required:
                                    - id
                                    - _view
                            media:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: number
                                  type:
                                    type: string
                                    enum:
                                      - photo
                                      - video
                                      - gif
                                      - audio
                                  convertedToVideo:
                                    type: boolean
                                  canView:
                                    type: boolean
                                  hasError:
                                    type: boolean
                                  createdAt:
                                    type: string
                                  isReady:
                                    type: boolean
                                  duration:
                                    type: number
                                  releaseForms:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: number
                                        name:
                                          type: string
                                        partnerSource:
                                          type: string
                                        type:
                                          type: string
                                        user:
                                          type: object
                                          properties:
                                            view:
                                              type: string
                                            id:
                                              type: number
                                            name:
                                              type: string
                                            username:
                                              type: string
                                            isVerified:
                                              type: boolean
                                            avatar:
                                              type: string
                                            avatarThumbs:
                                              type: object
                                              properties:
                                                c50:
                                                  type: string
                                                c144:
                                                  type: string
                                              required:
                                                - c50
                                                - c144
                                            ivStatus:
                                              type: string
                                            isFromGuest:
                                              type: boolean
                                          required:
                                            - view
                                            - id
                                            - name
                                            - username
                                            - isVerified
                                            - avatar
                                            - avatarThumbs
                                            - ivStatus
                                            - isFromGuest
                                      required:
                                        - id
                                        - name
                                        - partnerSource
                                        - type
                                  hasCustomPreview:
                                    type: boolean
                                  videoSources:
                                    type: object
                                    properties:
                                      '240':
                                        type: string
                                        nullable: true
                                      '720':
                                        type: string
                                        nullable: true
                                  files:
                                    type: object
                                    properties:
                                      full:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          width:
                                            type: number
                                          height:
                                            type: number
                                          size:
                                            type: number
                                          sources:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                url:
                                                  type: string
                                                width:
                                                  type: number
                                                height:
                                                  type: number
                                                type:
                                                  type: string
                                              required:
                                                - url
                                        required:
                                          - url
                                          - sources
                                      thumb:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          width:
                                            type: number
                                          height:
                                            type: number
                                          size:
                                            type: number
                                        required:
                                          - url
                                      preview:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          width:
                                            type: number
                                          height:
                                            type: number
                                          size:
                                            type: number
                                          options:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                url:
                                                  type: string
                                                width:
                                                  type: number
                                                height:
                                                  type: number
                                                type:
                                                  type: string
                                              required:
                                                - url
                                        required:
                                          - url
                                          - options
                                      squarePreview:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          width:
                                            type: number
                                          height:
                                            type: number
                                          size:
                                            type: number
                                        required:
                                          - url
                                    required:
                                      - full
                                required:
                                  - id
                                  - type
                                  - convertedToVideo
                                  - canView
                                  - hasError
                                  - createdAt
                                  - isReady
                                  - releaseForms
                            isMediaReady:
                              type: boolean
                            mediaCount:
                              type: number
                            previews:
                              type: array
                              items:
                                type: number
                            lockedText:
                              type: boolean
                            responseType:
                              type: string
                            giphyId:
                              type: string
                              nullable: true
                            isFree:
                              type: boolean
                            isTip:
                              type: boolean
                            isReportedByMe:
                              type: boolean
                            isCouplePeopleMedia:
                              type: boolean
                            queueId:
                              type: number
                            isMarkdownDisabled:
                              type: boolean
                            releaseForms:
                              nullable: true
                            isFromQueue:
                              type: boolean
                            canUnsendQueue:
                              type: boolean
                            unsendSecondsQueue:
                              type: number
                            isOpened:
                              type: boolean
                            isNew:
                              type: boolean
                            createdAt:
                              type: string
                            changedAt:
                              type: string
                            cancelSeconds:
                              type: number
                            isLiked:
                              type: boolean
                            canPurchase:
                              type: boolean
                            canPurchaseReason:
                              type: string
                            canReport:
                              type: boolean
                            canBePinned:
                              type: boolean
                            isPinned:
                              type: boolean
                          required:
                            - id
                            - text
                            - fromUser
                            - media
                            - previews
                      required:
                        - id
                        - text
                        - fromUser
                        - media
                        - previews
                  hasMore:
                    type: boolean
                  nextLastId:
                    type: string
                    description: Pagination cursor — pass as last_id to fetch the next page
                required:
                  - list
                  - hasMore
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Rate Limit Exceeded
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
      security:
        - ApiKey: []
          ConnectionId: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: apiKey
      in: header
      description: >-
        Your OFAuth [API key](/quickstart#2-copy-your-api-key) for
        authenticating requests.
    ConnectionId:
      type: apiKey
      name: x-connection-id
      in: header
      description: >-
        Requires a [connection](/guides/connections) via the x-connection-id
        header.

````