MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / get_access_token

Method get_access_token

sendNotify.py:286–293  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

284 self.AGENTID = agentid
285
286 def get_access_token(self):
287 url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken'
288 values = {'corpid': self.CORPID,
289 'corpsecret': self.CORPSECRET,
290 }
291 req = requests.post(url, params=values)
292 data = json.loads(req.text)
293 return data["access_token"]
294
295 def send_text(self, message, touser="@all"):
296 send_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + self.get_access_token()

Callers 2

send_textMethod · 0.95
send_mpnewsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected