Get WeChat server IP address


Get the IP address of the WeChat server


If the public account needs to know the IP address list of the WeChat server for security and other reasons to implement relevant restrictions, you can obtain the WeChat server IP through this interface Address list or IP network segment information.

Interface call request description

##
http请求方式: GET
https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=ACCESS_TOKEN
Parameter description

ParameterIs it necessaryDescriptionaccess_tokenYes Public account’s access_token
Return instructions

Under normal circumstances, WeChat will return the following JSON data packet to the public account:

{
    "ip_list": [
        "127.0.0.1", 
        "127.0.0.2", 
        "101.226.103.0/25"
    ]
}


##Parameterip_list
Description
WeChat server IP address list


When there is an error WeChat will return error codes and other information. The JSON data packet example is as follows (this example is an invalid AppID error):

{"errcode":40013,"errmsg":"invalid appid"}
1474616910476054.jpg