If the Official Account needs to get the list of Weixin server IP addresses so as to impose related limits for security considerations, this API can be called to obtain the Weixin server IP address list or IP address range.

API Request Format

HTTP request method: GEThttps://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=ACCESS_TOKEN


Parameter Required Description
access_token Yes The access_token of the Official Account

Response Description

For a successful request, Weixin returns the following JSON packet to the Official Account:

{    "ip_list": [        "",         "",         ""    ]}
Parameter Description
ip_list List of Weixin server IP addresses

When an error occurs, Weixin will return an error code and related information. An example of the JSON packet (for an invalid AppID error) is shown below:

{"errcode":40013,"errmsg":"invalid appid"}