简体   繁体   English

使用 PHP 在 Amazon 中使用 sell-partner-api 上传数据

[英]Upload data using selling-partner-api in Amazon using PHP

I have successfully encrypted the required parameters, but I am posting the data to this URL我已成功加密所需的参数,但我将数据发布到此 URL

https://tortuga-prod-na.s3-external-1.amazonaws.com/%2FNinetyDays/amzn1.tortuga.3.xxxxx-xxx-xxxx-xxx-xxxxxxx.xxxxx https://tortuga-prod-na.s3-external-1.amazonaws.com/%2FNinetyDays/amzn1.tortuga.3.xxxxx-xxx-xxxx-xxx-xxxxxxx.xxxxx

Drops me this error AuthorizationHeaderMalformedThe authorization header is malformed;丢给我这个错误 AuthorizationHeaderMalformedThe authorization header is malformed; incorrect service "execute-api".不正确的服务“execute-api”。 This endpoint belongs to "s3".9DD75A286E7422B6rxCxNZ3veB/3ZJ1qrtvleA0JaHTPqprLYe3I5mM/LYLLEVPL6iKGv0irGmV1O9SS4AcmPsM/8/I=此端点属于“s3”。9DD75A286E7422B6rxCxNZ3veB/3ZJ1qrtvleA0JaHTPqprLYe3I5mM/LYLLEVPL6iKGv0irGmV1O9SS4AcmPsM/8/I=

$headers = [
    'Content-Type: text/plain; charset=utf-8',
    'X-Amz-Content-Sha256: UNSIGNED-PAYLOAD',
    'X-Amz-Date: 20210105T095435Z',
    'Authorization: AWS4-HMAC-SHA256 Credential={ access-key-when-create-IAM }/20210105/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-access-token;x-amz-content-sha256;x-amz-date, Signature={generated through auth process}',
];

I have lost no idea what's wrong.我不知道出了什么问题。 Any help will be appreciated.任何帮助将不胜感激。

Change service from 'execute-api' to 's3'将服务从“execute-api”更改为“s3”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM