Problem description
The OSSAccessKeyId field is missing from a signed URL request, causing authentication to fail.
Causes
Signed URL authentication requires the OSSAccessKeyId field in the query string. The OSSAccessKeyId parameter is not included in the URL.
Examples
The following request is missing OSSAccessKeyId and will fail:
GET /test.txt?Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.comA valid signed URL must include the required parameters:
GET /test.txt?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.comSolutions
Check your signed URL against the following required parameters:
| Parameter | Description | Example |
|---|---|---|
OSSAccessKeyId | Your AccessKey ID | nz2p**** |
Expires | Unix timestamp when the URL expires | 1141889120 |
Signature | URL-encoded signature string | vjbyPxybdZaNmGa%2ByT272YEAiv**** |
Verify that:
OSSAccessKeyIdis present in the query string.The value of
OSSAccessKeyIdmatches a valid AccessKey ID in your Alibaba Cloud account.
For the full signing specification, see Add signatures to URLs.
We recommend using Alibaba Cloud SDKs to generate signed URLs. SDKs automatically generate signatures for the requests without the need to manually calculate a signature. For SDK options, see Overview.
该文章对您有帮助吗?