0002-00000064
Updated at:
Problem description
The value of the AccessKeyId field in the signature request is invalid.
Causes
You initiated a signature request in which the AccessKeyId field in the Authorization header has an invalid value.
Examples
The following code provides an example of a signature request in which the value of the AccessKeyId field in the Authorization header is invalid. For example, \t is included in the value of the AccessKeyId field.
GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6qrrqxo2\t:UNQDb7GapEgJkcde6OhZ9J*****
Solutions
Calculate the value of the Authorization field as follows:
Authorization = "OSS " + AccessKeyId + ":" + Signature
Signature = base64(hmac-sha1(AccessKeySecret,
VERB + "\n"
+ Content-MD5 + "\n"
+ Content-Type + "\n"
+ Date + "\n"
+ CanonicalizedOSSHeaders
+ CanonicalizedResource))
For more information about how to calculate the value of the Authorization field, see Include signatures in the Authorization header.
Note
You can use an SDK to send requests. SDKs automatically sign your requests. For more information, see Use Alibaba Cloud SDKs to initiate requests.
Is this page helpful?