All Products
Search
Document Center

Object Storage Service:0002-00000219

Last Updated:Mar 28, 2025

Issue description

The x-oss-signature header is missing in the request.

Causes

You initiated a request that used the V4 signature, but the x-oss-signature header is missing in the request parameters.

Examples

The URL of a request contains information about the V4 signature, but the request parameters do not contain the x-oss-signature header.

GET /oss.jpg?x-oss-signature-verion=OSS4-HMAC-SHA256&x-oss-credential=***&x-oss-expires=1141889120&x-oss-additional-headers=host HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2022 08:48:18 GMT

The x-oss-signature header in the request parameters is required to specify the calculated signature.

Solutions

You must specify the x-oss-signature-verion, x-oss-credential, x-oss-expires, and x-oss-signature fields in the request. You can specify the x-oss-additional-headers field as needed. The following code provides an example on how to specify the x-oss-credential field:

GET /oss.jpg?x-oss-signature-verion=OSS4-HMAC-SHA256&x-oss-credential=LTAI****************/20221220/cn-hangzhou/oss/aliyun_v4_request&x-oss-expires=1141889120&x-oss-additional-headers=host&x-oss-signature=8u**a3 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2022 08:48:18 GMT

References

  • For information about how to use Alibaba Cloud SDKs to initiate a request that uses the V4 signature, see Overview.

  • Calculate the signature:

    If the server returns a response that contains the StringToSign parameter, you must check whether the value of the StringToSign parameter on the server is the same as the string before calculation.