Abstract


  • This note documents some of the common hiccups of using WeChat API

Common terminologies

WeChat Offical Account is 微信公众号.

WeChat Official Account API Verification


  • When your account verifies the signature sent from the WeChat API server, you need to return the echostr value. Make sure the return value has a Datatype of integer, or the verification will fail!

WeChat 5s Timeout


  • WeChat expects a response in 5s or it will timeout, and retries 3 times
  • One way to handle it is to send a response before timeout, asking WeChat user to try again later, more details can be found here
  • Another way to handle it is to use message push, so first send a response telling the user to wait patiently before the 5s timeout, then uses message push to push down the desired response to the user, more information on message push can be found here

References