http://mp.weixin.qq.com/wiki/4/2ccadaef44fe1e4b0322355c2312bfa8.html
Found the documentation
When the developer submits the verification application for the first time, the WeChat server will send a GET request to the filled URL with four parameters (signature, timestamp, nonce, echostr), and the developer will judge the authenticity of the message by verifying the signature (i.e., signature). After that, every time a developer receives a user message, WeChat will also bring the first three parameters (signature, timestamp, nonce) to access the URL set by the developer, and the developer will still judge the authenticity of the message through the validity of the signature. The validation method is the same as the first submission of the verification application. | parameter | description | | signature | WeChat cryptographic signature, signature combines the token parameters filled in by the developer with the timestamp and nonce parameters in the request. | | timestamp | Timestamp | | nonce | Random number | | echostr | Random string |
The developer verifies the request by checking the signature (the verification method is shown below). If you confirm that the GET request comes from the WeChat server, please return the echostr parameter content as it is, and the access will take effect and become a successful developer, otherwise the access will fail. The encryption/verification process is as follows:1. Sort the three parameters of token, timestamp, and nonce in dictionary order2. Stitch three parameter strings into a string for SHA1 encryption3. The encrypted string obtained by the developer can be compared with the signature to identify the origin of the request from WeChat |