0002-00000413

Updated at:

Problem description

The X-Amz-Credential parameter has an incorrect structure.

Cause

You sent an Amazon Simple Storage Service (S3)-compatible V4 request, but the structure of the X-Amz-Credential parameter is invalid.

Example problems

You sent a request that includes a signature in the URL parameters, but some fields are missing from the X-Amz-Credential parameter.

GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/us-east-1/s3/aws4_request&X-Amz-Date=20221220T084818Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=ab2**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: true

The X-Amz-Credential parameter must be in the <YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request format. In the preceding example, the signature date field YYYYMMDD is missing.

Solution

Make sure that the URL parameters are complete and correct.

GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20221220/us-east-1/s3/aws4_request&X-Amz-Date=20221220T084818Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=ab2s**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
x-oss-s3-compat: true

We recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.