Summary of Token Verification Failure Issues on WeChat Official Account Platform
Published: 2015-04-02
Many users suspect that this problem is caused by WeChat being unable to access the website, but in our handling process, it is actually caused by abnormal program return results. Please check the following aspects:
1. Improper file editing (Notepad, online editing), resulting in the addition of a utf8 bom signature
Solution: Use a multifunctional editor to remove bom
2. The php file closing tag is followed by line breaks or other characters
//File start
<?php
?>
//File end
Solution: Remove extra characters
3. Program gzip encryption exception
Solution: You can disable the program's gzip function
4. If the server user has installed SafeDog, it may intercept requests from Tencent servers
Solution: Uninstall SafeDog
The best debugging tool for this problem is curl, which can simulate WeChat requesting the api to diagnose the problem
curl http://xxx/index.php/api/xxx
5. Sites with 360 protection or Baidu Cloud Acceleration enabled will intercept parameter passing and affect verification. Turn off the protection and test again after it takes effect.
