Problem description
A signed request to a pay-by-requester bucket is rejected because the x-oss-request-payer header is missing or set to an invalid value.
Causes
Pay-by-requester mode requires requesters to explicitly acknowledge that they accept the charges for the request and any data transfer. OSS enforces this by requiring the x-oss-request-payer: requester header in every signed request. If the header is absent or carries an invalid value, OSS denies the request.
Examples
The following request triggers this error because the oss-example bucket has pay-by-requester enabled and the x-oss-request-payer header is not included:
GET /testobject HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 05:45:34 GMT
Authorization: OSS AK***ID:5a***Io=Solutions
Add x-oss-request-payer: requester to your request headers:
GET /testobject HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 05:45:34 GMT
Authorization: OSS AK***ID:5a***Io=
x-oss-request-payer: requesterBilling behavior:
Requesters pay for their own requests and traffic. If the requester is a RAM user, the Alibaba Cloud account that the RAM user belongs to is charged.
Bucket owners do not need to include
x-oss-request-payer. Bucket owners are charged for their own requests and traffic.