文件格式转换提示签名问题,求助!!!

Viewed 27

调用接口:https://solution.wps.cn/api/developer/v1/office/save/as/docx 接口调用后提示错误内容: {"code":30003,"message":"InvalidSignature","hint":"signature not match. expect: c29d5bec1a74c0d040ac1456db54594df6b669c2, actual: eae7999c45fdf0dcb8593d3c5a5c2d4d9b13831e","extra":""}

sha1前的原文为:VAFiNvvtWGFcTfgemyjtjSMvRfcEIEdu+2ae523e544a176a53a8e859b235efd32+application/json+Thu, 29 Feb 2024 09:57:52 GMT

md5原数据为:{"url":"https://zhisheng-oss.oss-cn-beijing.aliyuncs.com/ai_writing/20231223/0be69bb007004886919006d57b958095.doc","filename":"789.doc"}

sha1加密后的内容与【https://solution-community.wps.cn/questions/10010000000000621/10020000000000781】里面计算的结果是一致的。

具体哪个步骤配置错误,才造成加密数据不一致?

1 Answers

您好,可以参考这个回复https://solution-community.wps.cn/questions/10010000000003634/10020000000003651

已解决,问题在于:【application/json】应该是【application/json;charset=utf-8】,建议更新一下官网文档;PS:java post请求中的【application/json】都更换为【application/json;charset=utf-8】