All Products
Search
Document Center

Object Storage Service:0003-00000702

Last Updated:Jul 21, 2023

Problem description

An invalid x-oss-request-payer header or no x-oss-request-payer header is specified in the request to access a bucket for which pay-by-requester is enabled.

Causes

The x-oss-request-payer header is not configured or not configured correctly in the signed request URL for access to the bucket for which pay-by-requester is enabled.

Examples

For example, you initiate the following request:

GET /testobject?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com  
Date: Fri, 24 Feb 2012 05:45:34 GMT

If pay-by-requester is enabled for the oss-example bucket, the request is denied due to the absence of the x-oss-request-payer header in the request.

Solutions

If you want to access a bucket for which pay-by-requester is enabled, requesters instead of the bucket owner pay for requests to access the bucket. If a requester uses a RAM user of an Alibaba Cloud account to request data from the bucket, the Alibaba Cloud account to which the RAM user belongs is charged for the requests sent by the requester and the generated traffic.

If you include a signature in the request URL, you must include the x-oss-request-payer header in the request and set the header to requester. This verifies that you understand that you are responsible for the fees generated for the request and the data download. If you provide an invalid value of the header or do not specify the header in the request, the request is denied.

GET /testobject?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv****&x-oss-request-payer=requester HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com  
Date: Fri, 24 Feb 2012 05:45:34 GMT

Bucket owners do not need to specify the x-oss-request-payer header in the requests that are sent to access their buckets. Bucket owners are charged for their own requests and generated traffic.

References

Configure pay-by-requester