Problem description
The request does not contain a valid date header that is used for signature authentication.
Causes
You initiated a request, but the request does not contain a valid x-oss-date header or Date header.
Examples
You initiated a request that includes the signature in the Authorization header, but the request does not contain a valid Date header or the x-oss-date header.
GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization:OSS LTAI****************:UNQD*************************Solutions
Use one of the following methods to add a valid date header for signature authentication to the request:
Add the
Dateheader to the requestGET /oss.jpg HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Authorization:OSS LTAI****************:UNQD************************* Date: Tue, 20 Dec 2022 08:48:18 GMTAdd the
x-oss-dateheader to the requestGET /oss.jpg HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Authorization:OSS LTAI****************:UNQD************************* x-oss-date: 20221220T084818Z
We recommend that you use Alibaba Cloud SDKs to initiate a request that uses the V4 signature. For more information, see Overview.
References
For information about how to use Object Storage Service (OSS) SDKs to initiate a request that uses the V4 signature, see Calculate V4 signature by using OSS SDK for Python.
For information about how to specify the signature logic based on the V1 signature, see Overview.