0003-00000002

Updated at:

Problem description

OSS requires authentication for all bucket operations. This error occurs when a request includes no credentials or invalid credentials.

Causes

  • No credentials provided — the request was sent without an Authorization header or a signed URL. OSS does not allow anonymous access to this bucket.

  • Invalid AccessKey ID or AccessKey secret — an Authorization header was included, but the AccessKey ID or AccessKey secret is incorrect.

Examples

The following example shows a PutBucketReferer request that triggers this error. The request has no signature in the headers or the URL:

PUT /?referer HTTP/1.1
Date: Tue, 20 Dec 2022 08:48:18 GMT
Content-Length: xxx
Content-Type: application/xml
Host: BucketName.oss-example-endpoint.aliyuncs.com

<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
  <AllowEmptyReferer>false</AllowEmptyReferer>
  <RefererList></RefererList>
</RefererConfiguration>

Solutions

No credentials provided

If you are the owner of the bucket, we recommend that you use OSS SDKs to sign requests automatically. SDKs handle request signing so you do not need to construct Authorization headers manually. See Overview for available SDKs.

Use temporary access credentials from Security Token Service (STS) or a RAM user instead of your Alibaba Cloud account credentials. Make sure the account has the permissions required for the operation. See Common examples of RAM policies for examples.

Invalid credentials

If you provided authentication information in the request, make sure that your AccessKey ID and AccessKey secret are correct.