收藏
回答

接口字段参数实际返回与文档字段不一致

https://developers.weixin.qq.com/doc/service/api/custommenu/api_getmenu.html


文档中声明返回tag_id,但实际示例中返回了 group_id

实际返回参数示例:


请与技术人员核实是文档异常还是接口返回字段异常

回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员--许涛
    社区技术运营专员--许涛
    2025-09-04

    你好,提供下完整的请求包,回包,请求时间点和appid

    2025-09-04
    有用
    回复
  • 若水依寒
    若水依寒
    2025-09-16

    经过测试发现是文档出错,这里 tag_id 实际返回为 group_id


    curl --location --request GET 'https://api.weixin.qq.com/cgi-bin/menu/get?access_token=96_LjUBK9OjLvXgsjheT0Yvgbh94rAcsbXgCkAqhHYx829aUBz4-f9dtiGMqy29Jda_l5JRQleN0wBoFXLt01aP2ysWWI2FSOG25XUHOd4jQm4wrwsuDq1_eX-v7_UGQIiAEARBT' \
    --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
    --header 'Accept: */*' \
    --header 'Host: api.weixin.qq.com' \
    --header 'Connection: keep-alive'
    
    请求时间:20250916 14:59:00
    
    
    响应结果:
    {
       "menu": {
            "button": [
                {
                    "type": "click",
                    "name": "今日歌曲",
                    "key": "V1001_TODAY_MUSIC",
                    "sub_button": []
                },
                {
                    "name": "菜单",
                    "sub_button": [
                        {
                            "type": "view",
                            "name": "搜索",
                            "url": "http://www.soso.com/",
                            "sub_button": []
                        },
                        {
                            "type": "click",
                            "name": "赞一下我们",
                            "key": "V1001_GOOD",
                            "sub_button": []
                        }
                    ]
                }
            ],
            "menuid": 420922674
        },
        "conditionalmenu": [
            {
                "button": [
                    {
                        "type": "click",
                        "name": "今日歌曲",
                        "key": "V1001_TODAY_MUSIC",
                        "sub_button": []
                    },
                    {
                        "name": "菜单",
                        "sub_button": [
                            {
                                "type": "view",
                                "name": "搜索",
                                "url": "http://www.soso.com/",
                                "sub_button": []
                            },
                            {
                                "type": "click",
                                "name": "赞一下我们",
                                "key": "V1001_GOOD",
                                "sub_button": []
                            }
                        ]
                    }
                ],
                "matchrule": {
                    "group_id": "2"
                },
                "menuid": 420923101
            },
            {
                "button": [
                    {
                        "type": "click",
                        "name": "今日歌曲",
                        "key": "V1001_TODAY_MUSIC",
                        "sub_button": []
                    },
                    {
                        "name": "菜单",
                        "sub_button": [
                            {
                                "type": "view",
                                "name": "搜索",
                                "url": "http://www.soso.com/",
                                "sub_button": []
                            },
                            {
                                "type": "click",
                                "name": "赞一下我们",
                                "key": "V1001_GOOD",
                                "sub_button": []
                            }
                        ]
                    }
                ],
                "matchrule": {
                    "group_id": "2"
                },
                "menuid": 420923099
            },
            {
                "button": [
                    {
                        "type": "click",
                        "name": "今日歌曲",
                        "key": "V1001_TODAY_MUSIC",
                        "sub_button": []
                    },
                    {
                        "name": "菜单",
                        "sub_button": [
                            {
                                "type": "view",
                                "name": "搜索",
                                "url": "http://www.soso.com/",
                                "sub_button": []
                            },
                            {
                                "type": "click",
                                "name": "赞一下我们",
                                "key": "V1001_GOOD",
                                "sub_button": []
                            }
                        ]
                    }
                ],
                "matchrule": {
                    "group_id": "2"
                },
                "menuid": 420923097
            }
        ]
    }
    
    


    2025-09-16
    有用
    回复
登录 后发表内容