小程序auth.code2Session返回40013? 一直提示appid错误
postman返回信息如下:
{"errcode":40013,"errmsg":"invalid appid, rid: 6141b939-780dfdc2-1355eab6"}
具体的后端代码如下:
@app.route('/code2Session', methods=['get', 'post'])
def code2Session():
# global js_code
# print(js_code)
# global touser
data = {'secret': 'xxx','js_code': '073mFxll2UeXJ74VZIll26O4AA3mFxl0','grant_type': 'authorization_code','appid':'wxc811b0e21cd4d0a5'}
url = 'https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code'
SessionData = requests.get(url,params=data)