测试发送的数据
('suite_id', ['ww7e9f7a7fcdcc6c7b'])
('suite_secret', ['GKpv4KKgtFtxte2VQUdZvOiEl8nxZ1Si9cuwtYkkEuw'])
('suite_ticket', ['Ui-A07oDiwIg32xHPuzSMMy05L2iYFxAMUF-ylNoKKXoVO8ZXbjKum2q3B2017z2'])
代码
PostUrl = "https://qyapi.weixin.qq.com/cgi-bin/service/get_suite_token"
# PostUrl = "http://admin.guanxunlot.com/"
PostData = {
"suite_id": current_app.config.get("WEWORK")['CorpID'],
"suite_secret": current_app.config.get("WEWORK")['EncodingAESKey'],
"suite_ticket": current_app.redis.get("wework_ticket").decode("UTF-8")
}
http = urllib3.PoolManager()
resp = http.request(method='POST', url=PostUrl, fields=PostData)
print(resp.data.decode("utf-8"))
return jsonify(PostData)
