All Products
Search
Document Center

Object Storage Service:0002-00000232

Last Updated:Mar 21, 2025

Description

When accessing OSS resources via a V4 signed URL, the expiration time specified is reported as invalid.

Possible cause

The expiration time defined using the x-oss-expires parameter in the V4 signed URL is not within the supported time range.

Example

In the example below, the value of the x-oss-expires field is set to 691200 seconds (8 days), exceeding the maximum value (7 days) allowed for this field.

GET /oss.jpg?x-oss-additional-headers=host&x-oss-credential=accesskeyid%2F20231203%2Fcn-hangzhou%2Foss%2Faliyun_v4_request&x-oss-date=20231220T083018Z&x-oss-expires=691200&x-oss-signature=2c6****&x-oss-signature-version=OSS4-HMAC-SHA256
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

Solution

Make sure that the validity period of the signed URL complies with the specified requirements: the duration should be given in seconds (s), with a minimum allowed value of 1 second and a maximum allowed value of 604800 seconds (7 days).

Reference

V4 URL Signature (Recommended)