---
title: "获取公众号服务/自定义菜单/Get WeChat MP Account Services & Custom Menu"
method: POST
path: "/api/v1/wechat_mp/v2/fetch_account_services"
tags: ["WeChat-Media-Platform-V2-API"]
---

# 获取公众号服务/自定义菜单/Get WeChat MP Account Services & Custom Menu

`POST /api/v1/wechat_mp/v2/fetch_account_services`

## Request

- Base URL: `https://api.tikhub.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tikhub.io/api/v1/wechat_mp/v2/fetch_account_services`
- Auth: HTTP bearer

# [中文]
### 用途:
- 传 `gh_username`，返回公众号底部的自定义菜单 / 服务入口。未配置自定义菜单的账号返回空菜单。
- 价格：0.01$/次
- ⏱️ 由于微信服务器原因，本接口响应较慢，请将客户端请求超时（timeout）设置为 30 秒；timeout 设置过小会造成已扣费但收不到响应的情况。
### 参数:
- username: 公众号 `gh_username`（`gh_…`）。示例 `gh_363b924965e9`
- raw: 可选，默认 True。True=原始；False=精简解析。
### 返回:
- 公众号自定义菜单 / 服务入口

### 响应结构与 JSON Path:
#### `raw=false`（精简解析，snake_case）:
- 公众号 username: `$.data.biz_username`
- 菜单项列表（无菜单时为 `[]`）: `$.data.menu[]` —— 每项为菜单按钮（名称 / 类型 / 子菜单 / 跳转），无自定义菜单的账号该数组为空。
#### `raw=true`（原始，本接口默认）:
- `data` 为完整原始菜单结构。未配置菜单的账号返回空对象 `{}`。
- 精简版的 `menu[]` 即由此原始结构提取而来。

# [English]
### Purpose:
- Pass a `gh_username` to get the custom menu / service entries at the bottom of the official account. Accounts without a custom menu return an empty menu.
- Price: $0.01 per request
- ⏱️ Due to WeChat server latency, this endpoint responds slowly; please set your client request timeout to 30 seconds — a timeout that is too small may result in being billed without receiving the response.
### Parameters:
- username: Official account `gh_username` (`gh_…`). E.g. `gh_363b924965e9`
- raw: Optional, default True. True=raw; False=simplified parsing.
### Return:
- Custom menu / service entries of the official account

### Response structure & JSON Path:
#### `raw=false` (simplified, snake_case):
- Account username: `$.data.biz_username`
- Menu item list (`[]` when no menu): `$.data.menu[]` — each item is a menu button (name / type / sub-menu / jump); the array is empty for accounts without a custom menu.
#### `raw=true` (raw, default for this endpoint):
- `data` is the full raw menu structure. Accounts without a configured menu return an empty object `{}`.
- The simplified `menu[]` is extracted from this raw structure.

## Request body

- FetchAccountRequest
  - `username` string, required: 公众号 username。三种形态都支持：`gh_…`、`gh_…@app`（关联小程序的账号）、以及自定义微信号（如 `nikejdi`）。取自文章详情接口响应的 `$.data.content.user_name`/Official account username. Three forms are supported: `gh_…`, `gh_…@app` (mini-program-linked accounts) and custom WeChat IDs (e.g. `nikejdi`). Taken from `$.data.content.user_name` of the article detail endpoints
  - `raw` boolean: True=原始响应；False=精简解析结构/True=raw response; False=simplified parsed structure

## Response `200`

Successful Response

- ResponseModel
  - `code` integer: HTTP status code | HTTP状态码
  - `request_id` string, nullable: Unique request identifier | 唯一请求标识符
  - `message` string: Response message (EN-US) | 响应消息 (English)
  - `message_zh` string: Response message (ZH-CN) | 响应消息 (中文)
  - `support` string: Support message | 支持消息
  - `time` string: The time the response was generated | 生成响应的时间
  - `time_stamp` integer: The timestamp the response was generated | 生成响应的时间戳
  - `time_zone` string: The timezone of the response time | 响应时间的时区
  - `docs` string, nullable: Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接
  - `cache_message` string, nullable: Cache message (EN-US) | 缓存消息 (English)
  - `cache_message_zh` string, nullable: Cache message (ZH-CN) | 缓存消息 (中文)
  - `cache_url` string, nullable: The URL to access the cached result | 访问缓存结果的 URL
  - `router` string: The endpoint that generated this response | 生成此响应的端点
  - `params` unknown
  - `data` unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-08** `96a122a5f220`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-09-09** `dd6680ae8195`: 1 warning, 1 info
  - changed the pattern of the request property `username` from `^gh_[A-Za-z0-9_]+$` to `^[0-9A-Za-z][-_0-9A-Za-z]{1,63}(@[0-9A-Za-z]{1,16})?$`
  - the `username` request property's maxLength was increased from `64` to `80`
- **2026-09-01** `50f9ec6e1cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/changes/api/v1/wechat_mp/v2/fetch_account_services/post.md)

---

[API](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi.md) - [All operations](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/llms.txt) - [OpenAPI document](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/revisions/86a3483c705a?raw)
