0003-00000701

更新时间:
复制 MD 格式

Problem description

You cannot access a pay-by-requester bucket using an anonymous request.

Important

Pay-by-requester buckets do not allow anonymous access. Every request must include a valid signature.

Causes

The request did not include an Authorization header, so OSS treated it as anonymous and rejected it.

Examples

The following request has no Authorization header and is therefore anonymous. If pay-by-requester is enabled for the oss-example bucket, this request returns an error.

GET /testobject HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 05:45:34 GMT

Solutions

Sign your request and set x-oss-request-payer to requester in the request header or request URL. Setting this header confirms that you accept responsibility for the fees generated by the request and data download. Requesters—not the bucket owner—are charged for access to pay-by-requester buckets. If a requester uses a RAM user that belongs to an Alibaba Cloud account, that Alibaba Cloud account is charged for the requests and traffic.

For information on how to sign requests, see Overview and Include signatures in the Authorization header.

The following example shows a correctly signed request:

GET /testobject HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 05:45:34 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-request-payer: requester
Note

Bucket owners do not need to add the x-oss-request-payer header when accessing their own buckets. Bucket owners are charged for their own requests and traffic.

References

Pay-by-requester