After creating a custom menu using the API, the developer can also use the API to query the structure of the custom menu. Note that after setting personalized menus, you can use this Query Custom Menu API to get the information of the default menu and all personalized menus.

Request Description

httpRequest method: GET
https://api.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN

Response Description (when there is no personalized menu)

In correspond to the creation API, the correct Json return result:
{
    "menu": {
        "button": [
            {
                "type": "click", 
                "name": "Today's songs", 
                "key": "V1001_TODAY_MUSIC", 
                "sub_button": [ ]
            }, 
            {
                "type": "click", 
                "name": "Artist profile", 
                "key": "V1001_TODAY_SINGER", 
                "sub_button": [ ]
            }, 
            {
                "name": "Menu", 
                "sub_button": [
                    {
                        "type": "view", 
                        "name": "Search", 
                        "url": "http://www.soso.com/", 
                        "sub_button": [ ]
                    }, 
                    {
                        "type": "view", 
                        "name": "Video", 
                        "url": "http://v.qq.com/", 
                        "sub_button": [ ]
                    }, 
                    {
                        "type": "click", 
                        "name": "Give us a like", 
                        "key": "V1001_GOOD", 
                        "sub_button": [ ]
                    }
                ]
            }
        ]
    }
}

Response Description (when there is a personalized menu)

{
    "menu": {
        "button": [
            {
                "type": "click", 
                "name": "Today's songs", 
                "key": "V1001_TODAY_MUSIC", 
                "sub_button": [ ]
            }
        ], 
        "menuid": 208396938
    }, 
    "conditionalmenu": [
        {
            "button": [
                {
                    "type": "click", 
                    "name": "Today's songs", 
                    "key": "V1001_TODAY_MUSIC", 
                    "sub_button": [ ]
                }, 
                {
                    "name": "Menu", 
                    "sub_button": [
                        {
                            "type": "view", 
                            "name": "Search", 
                            "url": "http://www.soso.com/", 
                            "sub_button": [ ]
                        }, 
                        {
                            "type": "view", 
                            "name": "Video", 
                            "url": "http://v.qq.com/", 
                            "sub_button": [ ]
                        }, 
                        {
                            "type": "click", 
                            "name": "Give us a like", 
                            "key": "V1001_GOOD", 
                            "sub_button": [ ]
                        }
                    ]
                }
            ], 
            "matchrule": {
                "group_id": 2, 
                "sex": 1, 
                "country": "China", 
                "province": "Guangdong", 
                "city": "Guangzhou", 
                "client_platform_type": 2
            }, 
            "menuid": 208396993
        }
    ]

}

Note: "menu" is the default menu and "conditionalmenu" is the list of personalized menus. For field descriptions, see Personalized Menu APIs.

Debug this API using webpage debugging tool