All Products
Search
Document Center

Object Storage Service:0002-00000213

Last Updated:Jul 21, 2023

Problem description

The Credential parameter in the Authorization header is invalid.

Causes

You initiate a request that uses the V4 signature. However, the Credential parameter in the Authorization header is invalid.

Examples

The following code provides an example:

GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2022 08:48:18 GMT
Authorization: OSS4-HMAC-SHA256 Credential=AK**ID/20221220/us-east-1/oss/abc,Signature=18**0a
x-oss-content-sha256: UNSIGNED-PAYLOAD

The Credential parameter in the Authorization header of the request has an invalid suffix /abc. The valid suffix of the Credential parameter is /aliyun_v4_request.

Solutions

Make sure that the signature information contained in the Credential parameter is valid. The Credential parameter is in the following format: <AccessKeyId>/<SignDate>/<Region>/oss/aliyun_v4_request.

If you want to use the V4 signature, we recommend that you use Object Storage Service (OSS) SDKs to initiate requests. For more information, see Overview.