后台服务器是Python写的代码,
wx_c_url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token={}".format(self.access_token)
headers = {'Content-Type': 'application/json;charset=UTF-8'}
resp = requests.post(wx_c_url, data=json.dumps(payload, ensure_ascii=False).encode())
content = resp.json()
errcode = content.get("errcode")
if errcode == 0:
print("create menu bar success !!!!")
else:
errmsg = content.get("errmsg")
print("create menu bar error: {} errcode is: {}".format(errmsg, errcode))
服务器输出的 错误信息是 :
invalid credential, access_token is invalid or not latest rid: 60473ebc-41c85711-1e2c14d3 errcode is: 40001