Access_token is the global private key of the official account. The official account needs to use access_token when calling various interfaces. Developers need to save it properly. The storage of access_token must reserve at least 512 characters. The validity period of access_token is currently 2 hours. It needs to be refreshed regularly. Repeated acquisition will cause the last access_token to become invalid. Instructions on how to use and generate the access_token required for calling the public platform API: 1. To keep appsecrect confidential, the third party needs a central control server to obtain and refresh access_token. The access_token used by other business logic servers all comes from the central control server and should not be refreshed separately, otherwise the access_token will be overwritten and affect the business; If the third party does not use the central control server, but chooses each business logic point to refresh the access_token, conflicts may occur, resulting in unstable services. Official accounts can use AppID and AppSecret to call this interface to obtain access_token. AppID and AppSecret can be obtained from the WeChat Official Accounts Platform official website - Developer Center page (you need to be a developer and your account is not in abnormal status). Note that the https protocol must be used when calling all WeChat interfaces. Interface call request description http request method: GET Parameter Description Return Description Under normal circumstances, WeChat will return the following JSON data packet to the official account: {"access_token":"ACCESS_TOKEN","expires_in":7200} When an error occurs, WeChat will return an error code and other information. An example of a JSON data packet is as follows (this example is an invalid AppID error): {"errcode":40013,"errmsg":"invalid appid"} |
<<: Message signing and encryption/decryption - Developer Q&A
>>: Basic interface - Get the WeChat server IP address
Edit: Thanks Digging sand on the beach can defini...
1. Problem Description In Android development, th...
Recently, Samsung has become the focus of attenti...
Killing users’ unnecessary expectations and overl...
In 2021, will we still have Weibo? When brand blu...
The May Day holiday is coming soon, but before th...
There is no doubt that Android is a very popular ...
Today, I would like to talk to you about the issu...
In the mobile gaming market, given the increasing...
The Beijing Winter Olympics is about to begin! Th...
Which is better, Coca-Cola or Pepsi? This may be ...
Spot check! Name a group of people at high risk f...
On September 26, autonomous driving startup JingC...
What will I gain from joining the “Product Manage...
Everyone is talking about community operation and...