Menu query interface developed by WeChat

Y2J
Release: 2017-05-17 15:43:56
Original
1572 people have browsed it

After using the interface to create a custom menu, developers can also use the interface to query the structure of the custom menu. Please also note that after setting a personalized menu, you can use this custom menu query interface to obtain the default menu and all personalized menu information.

Request description

http request method: GETapi.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN

Return description (none When personalizing the menu)

corresponds to the creation interface, and the correct Json returns the result:
{"menu":{"button":[{"type":"click", "name":"Today's song","key":"V1001_TODAY_MUSIC","sub_button":[]},{"type":"click","name":"SingerIntroduction ","key":"V1001_TODAY_SINGER","sub_button":[]},{"name":"menu","sub_button":[{"type":"view","name":"Search","url":"www.soso.com/","sub_button":[]},{"type":"view","name":"Video ","url":"v.qq.com/","sub_button":[]},{"type":"click","name":"Like us","key":"V1001_GOOD", "sub_button":[]}]}]}}

Return instructions (when there is a personalized menu)

{
    "menu": {
        "button": [
            {
                "type": "click",
                 "name": "今日歌曲", 
                "key": "V1001_TODAY_MUSIC",
                 "sub_button": [ ]
            }
        ],
         "menuid": 208396938
    },
    "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": "view",
                            "name": "视频",
                             "url": "http://v.qq.com/",
                             "sub_button": [ ]
                        },
                         {
                            "type": "click",
                            "name": "赞一下我们",
                            "key": "V1001_GOOD",
                            "sub_button": [ ]
                        }
                    ]                }
            ],
             "matchrule": {
                "group_id": 2,
                "sex": 1,
                "country": "中国",
                "province": "广东",
                "city": "广州",
                "client_platform_type": 2
           },
             "menuid": 208396993
        }
    ]
}
Copy after login

Note: menu is the default menu, conditionalmenu is the personalized menu list . For field descriptions, please see the description on the Personalized Menu Interface page.

【Related Recommendations】

1. Special Recommendation: "php Programmer Toolbox" V0.1 version download

2. WeChat public account platform source code download

3. Alizi order system source code download

The above is the detailed content of Menu query interface developed by WeChat. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!