0002-00000071

更新时间:
复制 MD 格式

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.com

A 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.com

Solutions

Check your signed URL against the following required parameters:

ParameterDescriptionExample
OSSAccessKeyIdYour AccessKey IDnz2p****
ExpiresUnix timestamp when the URL expires1141889120
SignatureURL-encoded signature stringvjbyPxybdZaNmGa%2ByT272YEAiv****

Verify that:

  1. OSSAccessKeyId is present in the query string.

  2. The value of OSSAccessKeyId matches 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.