WeChat Get Account Services
Retrieve the custom menu and service entries shown at the bottom of a WeChat official account. Inputs: - request_body (required): An object containing username and optionally raw. - request_body.username (required): The account username. Supported forms are gh_…, gh_…@app for mini-program-linked accounts, and custom WeChat IDs such as nikejdi. Example: gh_363b924965e9. You can obtain this value from $.data.content.user_name in an article-detail response. - request_body.raw (optional boolean, default true): Use true for the original menu structure or false for a simplified parsed structure. Results: - raw=true: data contains the original menu structure. If the account has no configured custom menu, data is {}. - raw=false: $.data.biz_username contains the account username and $.data.menu contains the menu buttons, including names, types, submenus, and navigation targets where present. If no custom menu is configured, the menu list is []. This retrieves menu information; it does not activate the entries. Responses may be slow, so set the client request timeout to 30 seconds.
Pricing
| Condition | Charge |
|---|---|
| Each call | 20.65 credits/call |
20.65 credits/call Charges are per query. A successful query is billed even if it returns no results.
A fixed fee applies to each call to retrieve an official account's custom menus and service entries. The same fee applies to raw and simplified parsed responses.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 用于查询微信公众号底部自定义菜单及服务入口的请求体对象。包含必填的 username(公众号用户名)和可选的 raw(默认为 true,返回原始菜单结构;false 返回精简解析结构)。 | — |
request_body.raw | boolean | No | True=原始响应;False=精简解析结构/True=raw response; False=simplified parsed structure | true |
request_body.username | string | Yes | 公众号 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 | — |
Invocation example
Parameter templateGenerated from the parameter configuration. Replace the sample values before use.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_wechat_get_account_services' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"username": "gh_363b924965e9"
}
}
}'No response example available yet.


