How to get access_token for Wechat developers
This article will explain in detail how to obtain access_token for Wechat development. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Method 1 to get Access Token:
You can modify it manually here:
Https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
The appid and secret to be used here can be obtained in the test, as shown in the following figure:
Then modify it manually:
Https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxed89d8f74fa6fc51&secret=d4624c36b6795d1d99dcf0547af5443d
Then ask a rhetorical question, and you can see that he returned a piece of data in json format.
{"access_token": "fNNeJ5DpjmpE8SkZnyeByVP4xpqnZRMRkwlhZ7HZemT_WiULJ2YnpsNr4UgTG4zoJo5uMeOA2hFy2rlzOg-U9hnSpHuUuZMZRgI4ZhDK6KN_OIbNxHvfvdl4_wbW775oWKIdAAAIWU", "expires_in": 7200}
Method 2 to obtain Access Token:
Call the program get_token.php, then upload the file to your own Wechat server, call the get_token.php in the browser, and you can also get the value of access token.
The get_token.php code is as follows: