Problem description
When you use V4 signature authentication, the product identifier specified in the Credential field of the HEADER signature is invalid.
Cause
The request uses V4 signature authentication, but the product identifier in the Authorization header is incorrect or not supported by OSS.
Example
The following request uses s3 as the product identifier:
GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Sun, 01 Jun 2025 16:38:30 GMT
Authorization: OSS4-HMAC-SHA256 Credential=YourAccessKeyID/20250601/cn-hangzhou/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=YourSignature
Because s3 is not a valid service identifier for Alibaba Cloud OSS, this error is returned.
Solution
Make sure the product identifier in the Credential field of your Auth V4 request is valid. Replace the incorrect identifier with a supported product name, as shown in the following corrected request:
GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Sun, 01 Jun 2025 16:38:30 GMT
Authorization: OSS4-HMAC-SHA256 Credential=YourAccessKeyID/20250601/cn-hangzhou/oss/aws4_request, SignedHeaders=host;x-amz-date, Signature=YourSignature
该文章对您有帮助吗?