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

# 浏览或搜索公共频道目录

> 镜像官方客户端的“查找频道”屏幕。 没有
`search_text` 它浏览一个 `view` 并且至少需要一个国家的
代码； 用 `search_text` 它按名称搜索频道 (搜索不支持国家代码
)。 当 `has_more` 为 true 时，
使用 `cursor` 进行分页。 使用从
WhatsApp Web中捕获的无证WhatsApp 查询，可能会在没有通知的情况下改变。




## OpenAPI

````yaml /zh/openapi.yml get /newsletter/directory
openapi: 3.0.0
info:
  title: WhatsApp API 多设备
  version: 9.7.0
  description: |
    此 API 用于通过 API 发送什么应用。

    Web 仪表板是一个单独的项目(gowa-ui)； 服务器下载它的
    最新版本资产并在 `/` 处服务(或在
    APP_UI_ENABLED=false时返回一个 JSON 横幅)。

    设备范围：
    - 在所有设备范围的REST 调用上发送 `X-Device-Id` 。
    - WebSocket: 连接到"/w?device_id=<id>`.
    - WebSocket 身份验证（启用基本身份验证时）：浏览器无法为
      WebSocket 连接设置 Authorization 请求头，因此还需在
      查询字符串中传入 `&authorization=<base64(user:pass)>`。 在
      生产中使用TLS ，因为凭据在 URL 中可见。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: 初始连接到 Whatsapp 服务器
  - name: device
    description: 多设备支持的设备管理
  - name: user
    description: 获取信息
  - name: send
    description: 发送消息 (Text/Image/File/Video)。
  - name: message
    description: 消息操作 (撤销/react/update)。
  - name: call
    description: 通话管理 (拒绝来电)
  - name: chat
    description: 聊天对话和消息
  - name: group
    description: 组设置
  - name: newsletter
    description: 通讯设置
  - name: chatwoot
    description: 客户支持的聊天窗口集成
paths:
  /newsletter/directory:
    get:
      tags:
        - newsletter
      summary: 浏览或搜索公共频道目录
      description: |
        镜像官方客户端的“查找频道”屏幕。 没有
        `search_text` 它浏览一个 `view` 并且至少需要一个国家的
        代码； 用 `search_text` 它按名称搜索频道 (搜索不支持国家代码
        )。 当 `has_more` 为 true 时，
        使用 `cursor` 进行分页。 使用从
        WhatsApp Web中捕获的无证WhatsApp 查询，可能会在没有通知的情况下改变。
      operationId: searchNewsletterDirectory
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - name: view
          in: query
          required: false
          schema:
            type: string
            enum:
              - RECOMMENDED
              - TRENDING
              - POPULAR
              - NEW
              - FEATURED
            default: RECOMMENDED
        - name: search_text
          in: query
          required: false
          schema:
            type: string
          example: news
        - name: country_codes
          in: query
          required: false
          description: ISO 3166-1 alpha-2代码，重复或逗号分隔。 浏览视图时必填。
          schema:
            type: array
            items:
              type: string
          example:
            - ID
        - name: categories
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - BUSINESS
                - ENTERTAINMENT
                - LIFESTYLE
                - NEWS
                - ORGANIZATIONS
                - PEOPLE
                - SPORTS
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 50
        - name: cursor
          in: query
          required: false
          description: 上一页的下一个光标
          schema:
            type: string
      responses:
        '200':
          description: 好的
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewsletterDirectoryResponse'
        '400':
          description: 错误请求
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '500':
          description: 服务器内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: |
        多设备支持的设备标识符。 当多个设备被注册时需要.
        如果只有一个设备被注册，它将被用作默认。
        也可以以 `device_id` 查询参数提供。
      schema:
        type: string
        example: my-device-id
  schemas:
    NewsletterDirectoryResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success search newsletter directory
        results:
          type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Newsletter'
            next_cursor:
              type: string
              example: GTby6Oiy0/jOqwPYxYXQtvjOqwPC0uaVue3OqwMZ
            has_more:
              type: boolean
              example: true
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP 状态代码
        message:
          type: string
          example: field cannot be blank
          description: 详细错误消息
        results:
          type: object
          example: null
          description: 附加数据
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: 详细错误消息
        results:
          type: object
          example: null
          description: 附加数据
    Newsletter:
      type: object
      properties:
        id:
          type: string
          example: 120363144038483540@newsletter
        state:
          type: object
          properties:
            type:
              type: string
              example: active
        thread_metadata:
          type: object
          properties:
            creation_time:
              type: string
              example: '1688746895'
            invite:
              type: string
              example: 0029Va4K0PZ5a245NkngBA2M
            name:
              type: object
              properties:
                text:
                  type: string
                  example: WhatsApp
                id:
                  type: string
                  example: '1688746895480511'
                update_time:
                  type: string
                  example: '1688746895480511'
            description:
              type: object
              properties:
                text:
                  type: string
                  example: >-
                    WhatsApp's official channel. Follow for our latest feature
                    launches, updates, exclusive drops and more.
                id:
                  type: string
                  example: '1689653839450668'
                update_time:
                  type: string
                  example: '1689653839450668'
            subscribers_count:
              type: string
              example: '0'
            verification:
              type: string
              example: verified
            picture:
              type: object
              properties:
                url:
                  type: string
                  example: ''
                id:
                  type: string
                  example: '1707950960975554'
                type:
                  type: string
                  example: IMAGE
                direct_path:
                  type: string
                  example: >-
                    /v/t61.24694-24/416962407_970228831134395_8869146381947923973_n.jpg?ccb=11-4&oh=01_Q5AaIIvOIeu3l0HCZWILrmr-dGR_vXFqnhUeytw0-ojPc4hL&oe=670D95B1&_nc_sid=5e03e0&_nc_cat=110
            preview:
              type: object
              properties:
                url:
                  type: string
                  example: ''
                id:
                  type: string
                  example: '1707950960975554'
                type:
                  type: string
                  example: PREVIEW
                direct_path:
                  type: string
                  example: >-
                    /v/t61.24694-24/416962407_970228831134395_8869146381947923973_n.jpg?stp=dst-jpg_s192x192&ccb=11-4&oh=01_Q5AaIHO-DQklqm3q3awF7xwji_WAn9DkgZASQA0B2Ct0qbSa&oe=670D95B1&_nc_sid=5e03e0&_nc_cat=110
            settings:
              type: object
              properties:
                reaction_codes:
                  type: object
                  properties:
                    value:
                      type: string
                      example: ALL
        viewer_metadata:
          type: object
          nullable: true
          description: 当访客特定元数据不可用时为空。
          properties:
            mute:
              type: string
              example: 'off'
            role:
              type: string
              example: subscriber
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [WhatsApp 频道](https://gowa-docs.mintlify.site/zh/examples/newsletters.md)
- [安装](https://gowa-docs.mintlify.site/zh/installation.md)
- [从新闻消息下载媒体](https://gowa-docs.mintlify.site/zh/api-reference/newsletter/从新闻消息下载媒体.md)
- [JavaScript](https://gowa-docs.mintlify.site/zh/api-reference/sdks/javascript.md)
- [认证](https://gowa-docs.mintlify.site/zh/authentication.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.