0002-00000065
Updated at:
Issue description
The signature format is invalid.
Cause
The Signature field in the Authorization header is missing.
Example
The following code provides an example:
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 qn6qrrqxo2oawuk53otfjbyc:
Solution
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?