html52.com
我爱小程序-开发者交流社区

账单下载,为什么返回401 Unauthorized?

下载账单API


请求

GET https://api.mch.weixin.qq.com/v3/billdownload/file?token=hrMCJEdA8ZvxCijiGKEbSpINKwrmDpsG6wWNSx8CDeso23YeWuP8TJ9CpyK46CtI HTTP/1.1

返回

response.....HttpResponseProxy{HTTP/1.1 401 Unauthorized [Server: nginx, Date: Wed, 31 Aug 2022 10:52:22 GMT, Content-Type: text/plain; charset=utf-8, Content-Length: 496, Connection: keep-alive, Keep-Alive: timeout=8, Request-Id: 08E6FABC9806109E0618F9DAB74C20900128948403-269546525] ResponseEntityProxy{[Content-Type: text/plain; charset=utf-8,Content-Length: 496,Chunked: false]}}

返回的数据流信息

{"code":"SIGN_ERROR","detail":{"detail":{"issue":"sign not match"},"field":"signature","location":"authorization","sign_information":{"method":"GET","sign_message_length":142,"truncated_sign_message":"GET\n/v3/billdownload/file?token=hrMCJEdA8ZvxCijiGKEbSpINKwrmDpsG6wWNSx8CDeso23YeWuP8TJ9CpyK46CtI\n1661943142\n380616f09cfb4fd68d4831a7a2602a24\n\n","url":"/v3/billdownload/file?token=hrMCJEdA8ZvxCijiGKEbSpINKwrmDpsG6wWNSx8CDeso23YeWuP8TJ9CpyK46CtI"}},"message":"错误的签名,验签失败"}


回单下载用的也是同样的代码,没问题,为什么账单下载会报401 Unauthorized




评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付