Get custom menu configuration interface
Get custom menu configuration interface
#This interface will provide the configuration of the custom menu currently used by the official account. If the official account is If the menu is set by calling the API, the development configuration of the menu will be returned. If the official account publishes the menu through the website function on the official website of the public platform, this interface will return the menu configuration set by the operator.
Please note:
1、第三方平台开发者可以通过本接口,在旗下公众号将业务授权给你后,立即通过本接口检测公众号的自定义菜单配置,并通过接口再次给公众号设置好自动回复规则,以提升公众号运营者的业务体验。 2、本接口与自定义菜单查询接口的不同之处在于,本接口无论公众号的接口是如何设置的,都能查询到接口,而自定义菜单查询接口则仅能查询到使用API设置的菜单配置。 3、认证/未认证的服务号/订阅号,以及接口测试号,均拥有该接口权限。 4、从第三方平台的公众号登录授权机制上来说,该接口从属于消息与菜单权限集。 5、本接口中返回的图片/语音/视频为临时素材(临时素材每次获取都不同,3天内有效,通过素材管理-获取临时素材接口来获取这些素材),本接口返回的图文消息为永久素材素材(通过素材管理-获取永久素材接口来获取这些素材)。
Interface call request instructions
http请求方式: GET(请使用https协议)https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token=ACCESS_TOKEN
Return result instructions
If the official account publishes menus through website functions on the official website of the public platform, The custom menu configuration sample returned by this interface is as follows:
{ "is_menu_open": 1, "selfmenu_info": { "button": [ { "name": "button", "sub_button": { "list": [ { "type": "view", "name": "view_url", "url": "http://www.qq.com" }, { "type": "news", "name": "news", "value":"KQb_w_Tiz-nSdVLoTV35Psmty8hGBulGhEdbb9SKs-o", "news_info": { "list": [ { "title": "MULTI_NEWS", "author": "JIMZHENG", "digest": "text", "show_cover": 0, "cover_url": "http://mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfK0HKuBIa1A1cypS0uY1wickv70iaY1gf3I1DTszuJoS3lAVLvhTcm9sDA/0", "content_url": "http://mp.weixin.qq.com/s?__biz=MjM5ODUwNTM3Ng==&mid=204013432&idx=1&sn=80ce6d9abcb832237bf86c87e50fda15#rd", "source_url": "" }, { "title": "MULTI_NEWS1", "author": "JIMZHENG", "digest": "MULTI_NEWS1", "show_cover": 1, "cover_url": "http://mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfKnmnpXYgWmQD5gXUrEApIYBCgvh2yHsu3ic3anDUGtUCHwjiaEC5bicd7A/0", "content_url": "http://mp.weixin.qq.com/s?__biz=MjM5ODUwNTM3Ng==&mid=204013432&idx=2&sn=8226843afb14ecdecb08d9ce46bc1d37#rd", "source_url": "" } ] } }, { "type": "video", "name": "video", "value": "http://61.182.130.30/vweixinp.tc.qq.com/1007_114bcede9a2244eeb5ab7f76d951df5f.f10.mp4?vkey=77A42D0C2015FBB0A3653D29C571B5F4BBF1D243FBEF17F09C24FF1F2F22E30881BD350E360BC53F&sha=0&save=1" }, { "type": "voice", "name": "voice", "value": "nTXe3aghlQ4XYHa0AQPWiQQbFW9RVtaYTLPC1PCQx11qc9UB6CiUPFjdkeEtJicn" } ] } }, { "type": "text", "name": "text", "value": "This is text!" }, { "type": "img", "name": "photo", "value": "ax5Whs5dsoomJLEppAvftBUuH7CgXCZGFbFJifmbUjnQk_ierMHY99Y5d2Cv14RD" } ] } }
If the official account is a menu set through API calls, the custom menu configuration sample is as follows:
{ "is_menu_open": 1, "selfmenu_info": { "button": [ { "type": "click", "name": "今日歌曲", "key": "V1001_TODAY_MUSIC" }, { "name": "菜单", "sub_button": { "list": [ { "type": "view", "name": "搜索", "url": "http://www.soso.com/" }, { "type": "view", "name": "视频", "url": "http://v.qq.com/" }, { "type": "click", "name": "赞一下我们", "key": "V1001_GOOD" } ] } } ] } }
Parameter description
<tr class="firstRow thead"<th class="table_cell"">Description