Problem description
When using Signature Version 4 (V4) authentication, the service identifier in the Credential field of a POST request is invalid.
Root cause
You sent a POST request that uses V4 authentication, but the service identifier in the request is incorrect or unsupported.
Problem examples
You sent the following invalid request, which uses s3 as the service identifier:
POST / HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Type: multipart/form-data; boundary=9431149156168
Content-Length: 884
--9431149156168
Content-Disposition: form-data; name="key"
oss.jpg
--9431149156168
Content-Disposition: form-data; name="x-oss-credential"
YourAccessKeyID/20250601/cn-hangzhou/s3/aliyun_v4_request
--9431149156168This error occurs because s3 is not a valid service identifier for Alibaba Cloud OSS.
Solution
Make sure the service identifier in your POST request with V4 authentication is correct and supported. Update the request to use a valid service identifier.
POST / HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Type: multipart/form-data; boundary=9431149156168
Content-Length: 884
--9431149156168
Content-Disposition: form-data; name="key"
oss.jpg
--9431149156168
Content-Disposition: form-data; name="x-oss-credential"
YourAccessKeyID/20250601/cn-hangzhou/oss/aliyun_v4_request
--9431149156168该文章对您有帮助吗?