All Products
Search
Document Center

Object Storage Service:0002-00000068

Last Updated:Jul 21, 2023

Problem description

The expiration time of the URL is not included in the signed URL.

Causes

You initiated a URL-based signature request in which the Expires field that specifies the expiration time of the request URL wad left empty.

Examples

The following code provides an example of URL-based signature request in which the Expires field is left empty.

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.com

The Expires field specifies the expiration time of the request URL. The value of this field must be a UNIX timestamp. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970. If the time when Object Storage Service (OSS) receives the request URL is later than the value of this field, a request timeout error is reported. For example, the current time is 1141889060. To create a request URL that is valid for 60 seconds, set the field to 1141889120.

Solutions

Make sure that the Expires field in the URL-based signature request is specified with a valid value.

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.com

For more information, see Add signatures to URLs.

Note

We recommend that you use Alibaba Cloud SDKs to initiate requests. Alibaba Cloud SDKs automatically generate signatures for the requests without the need to manually calculate a signature. For more information, see Overview.