0002-00000413

Updated at: 2025-03-27 07:36

Problem description

The syntax of the X-Amz-Credential field in the request is invalid.

Causes

You initiated a request that uses an Amazon S3-compatible V4 signature. However, the syntax of the X-Amz-Credential field is invalid.

Examples

You initiated a request that uses an Amazon S3-compatible V4 signature in the URL parameter. However, the syntax of the X-Amz-Credential field in the request is incomplete.

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 value of the X-Amz-Credential field must be in the following format: <YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request. In the preceding example, YYYYMMDD that specifies the signature date is missing.

Solutions

Make sure that the syntax of the X-Amz-Credential field in the URL parameter is complete and the value of the field is valid.

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.

  • On this page (1, T)
  • Problem description
  • Causes
  • Examples
  • Solutions
Feedback