收藏
回答

公众号AccessToken时而有效时而无效?

AppID: wxca0e8b6ea16cc286

问题描述: 在调用创建临时二维码时,使用相同的access_token调用,第一次能正常调用,第二次则提示invalid credential, access_token is invalid or not latest hints,第三次调用又正常了。

代码:

[15:17:52] : RequestURL: https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=31_tIsICvxug7IuOObcUAXu6rRTen-0ihSXCzJZ02j444L7Rehq9-C4Ye-ZkBiIAiOrc86tiSG4FP2UTKzcK9Q2qFEt-7EDuTOiTE2C5NuK7Tg37Xvpj-0neo6MF4C33RqmsY7LqNKYaeGkr-r9NSLgAEAEJC, METHOD: POST

[15:17:52] : RequestParams: "{\"expire_seconds\":7200,\"action_name\":\"QR_STR_SCENE\",\"action_info\":{\"scene\":{\"scene_str\":\"158468867277991\"}}}"

[15:17:52] : ResponseData: {"ticket":"gQHw7jwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycjNOdHNWWTQ4VFQxcDFhUTF1Y3IAAgQhbnReAwQgHAAA","expire_seconds":7200,"url":"http:\/\/weixin.qq.com\/q\/02r3NtsVY48TT1p1aQ1ucr"}

[15:17:50] : RequestURL: https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=31_tIsICvxug7IuOObcUAXu6rRTen-0ihSXCzJZ02j444L7Rehq9-C4Ye-ZkBiIAiOrc86tiSG4FP2UTKzcK9Q2qFEt-7EDuTOiTE2C5NuK7Tg37Xvpj-0neo6MF4C33RqmsY7LqNKYaeGkr-r9NSLgAEAEJC, METHOD: POST

[15:17:50] : RequestParams: "{\"expire_seconds\":7200,\"action_name\":\"QR_STR_SCENE\",\"action_info\":{\"scene\":{\"scene_str\":\"158468867015527\"}}}"

[15:17:50] : ResponseData: {"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest hints: [ihJb36aLRa-uuIENA!]"}


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签