Description
Your request that uses the V4 signature is invalid.
Possible causes
The V4 signature is used in your request. However, the <Region> value specified in the x-oss-credential header is invalid, or the <Region> values specified in the Host and x-oss-credential headers do not match.
Examples
Example 1
The V4 signature is contained in the URL of the request. However, the <Region> value (
oss-cn-hangzhou) specified in thex-oss-credentialheader is invalid and does not match the region ID required by the V4 signature, which does not includeoss-.GET /oss.jpg?x-oss-signature-verion=OSS4-HMAC-SHA256&x-oss-credential=AK**ID/2024-11-13/oss-cn-hangzhou/oss/abc&x-oss-expires=1141889120&x-oss-additional-headers=host&x-oss-signature=8u**a3 HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Date: Wed, 13 Nov 2024 08:48:18 GMTExample 2
The <Region> value (
oss-cn-shenzhen) specified in the Host header does not match the <Region> value (cn-hangzhou) specified in thex-oss-credentialheader.GET /oss.jpg?x-oss-signature-verion=OSS4-HMAC-SHA256&x-oss-credential=AK**ID/2024-11-13/cn-hangzhou/oss/abc&x-oss-expires=1141889120&x-oss-additional-headers=host&x-oss-signature=8u**a3 HTTP/1.1 Host: oss-example.oss-cn-shenzhen.aliyuncs.com Date: Date: Wed, 13 Nov 2024 08:48:18 GMT
Solutions
The region ID is required for the <Region> value specified in the
x-oss-credentialheader. Example:cn-hangzhou.The <Region> value specified in the Host header must match the <Region> value specified in the
x-oss-credentialheader. The OSS region ID is required for the <Region> value specified in the Host header. Please specify the OSS region ID is in the following format:oss-{region-id}. Example:oss-cn-hangzhou.
Reference
For more information, see OSS regions and endpoints.