MCPcopy
hub / github.com/wechatpy/wechatpy / fetch_access_token

Method fetch_access_token

wechatpy/client/__init__.py:53–67  ·  view source on GitHub ↗

获取 access token 详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档 :return: 返回的 JSON 数据包

(self)

Source from the content-addressed store, hash-verified

51 self.secret = secret
52
53 def fetch_access_token(self):
54 """
55 获取 access token
56 详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档
57
58 :return: 返回的 JSON 数据包
59 """
60 return self._fetch_access_token(
61 url='https://api.weixin.qq.com/cgi-bin/token',
62 params={
63 'grant_type': 'client_credential',
64 'appid': self.appid,
65 'secret': self.secret
66 }
67 )
68
69
70class WeChatComponentClient(WeChatClient):

Calls 1

_fetch_access_tokenMethod · 0.45