Problem description
The signed URL does not include an expiration time.
Causes
The URL-based signature request includes the Expires query parameter, but the value is blank.
Expires specifies when the signed URL stops being valid. Object Storage Service (OSS) rejects any request received after this time. The value must be a UNIX timestamp — the number of seconds elapsed since 00:00:00 Thursday, January 1, 1970.
| Parameter | Example value | Description |
|---|---|---|
Expires | 1141889120 | The expiration time of the signed URL, expressed as a UNIX timestamp. OSS rejects requests received after this time. |
For example, if the current time is 1141889060 and you want the URL valid for 60 seconds, set Expires to 1141889120.
Examples
The following request has a blank Expires value:
GET /test.txt?OSSAccessKeyId=nz2p****&Expires=&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.comSolutions
Set Expires to a valid UNIX timestamp in the signed URL:
GET /test.txt?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.comFor more information about URL-based signatures, see Add signatures to URLs.
Use Alibaba Cloud SDKs to initiate requests. SDKs automatically generate signatures without the need to manually calculate a signature, including setting the Expires value correctly. See Overview.该文章对您有帮助吗?