WeChat development to obtain server IP

Y2J
Release: 2017-05-16 11:00:52
Original
2507 people have browsed it

If the official account is based on security considerations for message reception , it needs to know the IP address list of the WeChat server in order to identify which messages are officially pushed to you by WeChat and which messages may be forged by others. You can obtain the WeChat server IP address list through this interface.

Interface call request description

http request method: GET

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

Parameter description

WeChat development to obtain server IP

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.1"]
}
Copy after login

WeChat development to obtain server IP

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

{"errcode":40013,"errmsg":"invalid appid"}
Copy after login

[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 WeChat development to obtain server IP. For more information, please follow other related articles on the PHP Chinese website!

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