All Products
Search
Document Center

Object Storage Service:0002-00000303

Last Updated:Jul 21, 2023

Problem description

The AccessKeyId field in the request is missing.

Causes

You initialized a request that used an Amazon S3-compatible signature. However, the request did not include the AWSAccessKeyId field.

Examples

The following code provides an example of a request that uses an S3-compatible signature and does not include the AWSAccessKeyId field.

GET /test.txt?Expires=1141889120Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: true

Solutions

If you want to initiate a request that uses an Amazon S3-compatible signature, you must include the following fields into the request: AWSAccessKeyId, Expires, and Signature. The following code provides an example of a complete request:

GET /test.txt?AWSAccessKeyId=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
x-oss-s3-compat: true

We recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.