Obtaining WeChat Push Server IP

View llm.txt

Last edited on 2026-03-02

This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.

API English Name: getCallbackIp

This interface is used to obtain the IP address of WeChat's push server (the source address of the WeChat server that sends messages to the developer's server).

If developers need to know the list of WeChat server IP addresses for security or other reasons, so as to implement relevant restrictions, they can use this interface to obtain the list of WeChat server IP addresses or IP range information.

1. Call Method

HTTPS Call

GET https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=ACCESS_TOKEN

Cloud Call

  • This API does not support cloud call.

Third-party Call

2. Request Parameters

Query Parameters Query String Parameters

ParameterTypeRequiredDescription
access_tokenstringYesAPI call credential, you can use access_token (Supplier), component_access_token (Service Provider), authorizer_access_token (Service Provider Proxy Call)

Request Body Request Payload

None

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
ip_liststringList of WeChat server IP addresses
errcodenumberError codes
errmsgstringError messages

4. Notes

  1. Since the outbound and inbound IP addresses may change, it is recommended that users request this interface once a day to keep the IP list up to date. To avoid single-point failures, it is strongly advised not to use an old IP list as the access point for api.weixin.qq.com for an extended period.
  2. When using a fixed IP to access api.weixin.qq.com, developers should pay attention to operator compatibility, as cross-operator access may experience packet loss during peak times.
  3. Since the outbound and inbound IP addresses may change, it is recommended that users request this interface once a day to keep the IP list up to date. To avoid single-point failures, it is strongly advised not to use an old IP list as the access point for api.weixin.qq.com for an extended period.

5. Code Example

5.1 Successful response

Request Example

{}

Response Example

{
  "ip_list": [
    "106.55.206.146",
    "106.55.206.211"
  ]
}

5.2 Error response

Request Example

{}

Response Example

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

6. Error Codes

The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.

Error CodeError DescriptionSolution
40013invalid appidInvalid AppID

7. Applicable Scope

API callable status for different account types:
Mini ProgramOfficial AccountService AccountMini GameWeChat ShopAlliance AgencyInfluencerShop SupplierThird-party PlatformMobile AppWebsite AppChannels WindowMulti-platform App
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ 〇 ✔ ✔ ✔ ✔
  • ✔:This account type can call this API。
  • 〇:Third-party platforms can use component_access_token to call. For calling on behalf of Supplier, please refer to the Call Method section。