调用API报“Incorrect app authentication information”
APP认证信息错误有:
- Incorrect app authentication information: app not found, appkey xxx
- Incorrect app authentication information: verify signature fail, canonicalRequest
- Incorrect app authentication information: signature expired
Incorrect app authentication information: app not found, appkey xxx
{ "error_msg": "Incorrect app authentication information: app not found, appkey 0117***e5e1", "error_code": "APIG.0303", "request_id": "a532***5aca" }
可能原因
appkey配置错误。
解决方法
- 在API网关控制台页面的左侧导航栏中选择“API管理 > 凭据管理”。
- 单击对应的凭据名称,进入凭据详情。
- 查看“Key”值,并重新配置appkey。
Incorrect app authentication information: verify signature fail, canonicalRequest
{ "error_msg": "Incorrect app authentication information: verify signature fail, canonicalRequest:GET|/test/||host:d7da***3df7.example.com|x-sdk-date:20230527T015431Z||host;x-sdk-date|e3b0c***52b855", "error_code": "APIG.0303", "request_id": "cb14***62dc" }
可能原因
签名认证算法使用有问题,客户端计算的签名结果与API网关计算的签名结果不同。
解决方法
请参考Incorrect IAM authentication information: verify aksk signature fail。
Incorrect app authentication information: signature expired
{ "error_msg": "Incorrect app authentication information: signature expired, signature time:20230527T000431Z,server time:20230527T020608Z", "error_code": "APIG.0303", "request_id": "fd65***b8ad" }
可能原因
客户端签名时间戳x-sdk-date与APIGW服务器时间相差超过15min。
解决方法
检查客户端时间是否正确。