Multiple systems share a WeChat official account. When uploading pictures, the access_token will be returned as expired. How to solve this problem?

PHP中文网
Release: 2023-03-03 11:12:01
Original
2701 people have browsed it


Multiple systems developed need to call the same WeChat official account, but when uploading pictures,
s:110:"{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest hint: [J3U7wA0390vr31!]"}";
error, have you encountered it? Is there any good solution?

Reply content:

The multiple systems developed need to call the same WeChat official account, but when uploading pictures,
s:110:"{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest hint: [J3U7wA0390vr31!]"}";
, have you encountered the error? Is there any good solution?


Want to know where theaccess_tokenof each system is stored? It stands to reason that this situation can be avoided by ensuring that each system reads the cache in one place!

Our general approach is to store it in redis. The premise is that the redis data read by your three systems is consistent!


Save to redis and call together.

The above is a WeChat public account shared by multiple systems. When uploading pictures, the access_token expired will be returned. How to solve it? For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!


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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!