• Resolved thevisas

    (@thevisas)


    Hi,

    Could you please advise if Wechat authentication and responder are supposed to work out of the box or additional programming is needed.

    All required configuration on the WeChat developer backend has been done. But when trying to enable server config in https://mp.weixin.qq.com/ the error message is “URL request timeout”.
    When accessing page https://www.thevisasofoz.com/weixin-responder directly, 404 error is produced.

    In addition, when trying to use WeChat authentication in WeChat browser, the error message is “Access to user information failed:40164: Unknown error.”

    The official account name is TheVisasofOZ. W3TC caching plugin is used in wordpress but according to documentation it is supposed to be compatible.

    Your assistance will be highly appreciated.

    Regards, Vitali.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Alexandre Froger

    (@frogerme)

    Hello @thevisas / Vitali!

    Thank you for your question, and the details.
    Could you please try the following, in order:
    – clear the permalinks by visiting /wp-admin/options-permalink.php and try again
    – deactivate the W3TC caching plugin, clear the permalinks, and try again
    – reactivate W3TC caching plugin and try again

    … to try and pinpoint the issue? After that, if there are issues still occurring, I will follow up with you.

    Best regards,
    Alexandre Froger

    Thread Starter thevisas

    (@thevisas)

    Hi Alexandre,

    Thank you for your prompt response. After clearing permalink and clearing caches in SG Optimizer and W3TC, weixin responder is working and it is now registered in https://mp.weixin.qq.com.

    However, authentication is still failing both when using WeChat or standard browser.

    So far, I have tried to disabled both caching plugins and clearing permalink. But the error message remains the same as before.

    Standard browser authentication can be tested at the following address https://www.thevisasofoz.com/wp-login.php.

    Thank you again for looking into the issue.

    Regard,
    Vitali.

    Plugin Author Alexandre Froger

    (@frogerme)

    Hi Vitali!

    I see there is an error code when trying to authenticate – although I did not make the message explicit, this error actually corresponds to:

    40164 如非白名单IP调用 This account is using an IP white list. Only IP addresses listed on the WeChat backend can get this account’s WeChat access token.

    You can add your server’s IP to the white list in https://mp.weixin.qq.com, at the same place where you’ve setup the token and found your App ID etc.

    Thread Starter thevisas

    (@thevisas)

    Hi Alexandre,

    I have tried authentication with and without populating IP whitelist on https://mp.weixin.qq.com.
    But the error message remains the same.
    At the moment IP whitelist has 4 addresses.
    First IP is a shared server address on Site Ground as shown in cPanel. The last 2 addresses are Cloudflare IPs. The second is added just in case as it can be seen as a first IP in email headers.
    Previously, I had only the first IP configured, but addition of others did not make any difference.
    Cloudflare should not at fault here as an API call comes from the actual server rather than Cloudflare.
    Not sure if there is any debug in plugin. I have tried online API debugging tool in WeChat. If my own IP is not in whitelist I get the same error, but after adding my external IP to the whitelist I was able to get a token using this tool. But I am not sure if WeChat keeps any logs of IPs that are trying to access its API, so I can check which IP maybe failing.

    Finally, using trial and error method and a bit of luck I have managed to get it working by adding account name servers(as shown in cPanel) IP addresses to the list. Not sure why it makes a difference except maybe that SiteGround is using these servers as outgoing proxies.

    Thank you again for your help.

    Kind regards, Vitali.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WeChat Authentication and weixin-responder’ is closed to new replies.