Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to get access_token for Wechat developers

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report