Problem description
A request cannot include a security token in both the request header and the URL parameters.
Problem cause
You sent a request that uses credentials from the Security Token Service (STS) for authentication. The request includes both the x-oss-security-token header and the security-token URL parameter.
Example Problems
You sent an STS-based authentication request with the security token included in both the request header and the URL request parameters.
GET /oss.jpg?security-token=CAISowJ1q6Ft5B2yfSjIr5bgIOz31blR**** HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-security-token: CAISowJ1q6Ft5B2yfSjIr5bgIOz31blR****Solution
Remove the security token from the URL parameters. Include the security token only in the request header.
GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT
Authorization: OSS qn6q**************:77Dv****************
x-amz-security-token: CAISowJ1q6Ft5B2yfSjIr5bgIOz31blR****该文章对您有帮助吗?