收藏
回答

获取企业微信第三方应用凭证 返回47001 格式和文档一样 到底为什么不行?


测试发送的数据

('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)


回答关注问题邀请回答
收藏
登录 后发表内容