0002-00000066

Updated at:

Problem description

The signature version in the request is invalid.

Causes

The signature version specified by the x-oss-signature-version parameter in the request URL is invalid.

Examples

A request that contains the signature information in the parameter of the request URL is initiated. However, the value ABC of the x-oss-signature-version parameter is invalid.

GET /test.txt?x-oss-signature-version=ABC&x-oss-expires=1141889120&x-oss-signature=abc***&x-oss-access-key-id=asfd*** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

Solutions

  • Use the V1 signature to initiate a request

    If you use the V1 signature to initiate a request, you do not need to include the x-oss-signature-version parameter in the request URL.

    GET /test.txt?OSSAccessKeyId=nz2pc56s936****&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
  • Use the V2 signature to initiate a request

    If you use a V2 signature to initiate a request, you must include the x-oss-signature-version parameter in the request URL and set the parameter to OSS2.

    GET /test.txt?x-oss-signature-version=OSS2&x-oss-expires=1141889120&x-oss-signature=abc***&x-oss-access-key-id=asfd*** 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

You can use an SDK to send requests. SDKs automatically sign your requests. For more information, see Use Alibaba Cloud SDKs to initiate requests.