我正在使用Amazon API并在将我的库存从我的数据库更新到亚马逊网站时出现此错误:
Caught Exception: Internal Error
Response Status Code: 0
Error Code:
Error Type:
Request ID:
XML:
Run Code Online (Sandbox Code Playgroud)
我读了这个帖子(amazonsellercommunity.com/forums/thread.jspa?messageID = 2194823),然后得到错误说明:
<Error><Type>Sender</Type><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message><Detail/></Error>
Run Code Online (Sandbox Code Playgroud)
所以我认为我的MARKETPLACE_ID,MERCHANT_ID,AWS_ACCESS_KEY_ID或AWS_SECRET_ACCESS_KEY可能是错误的.但我检查了这些信息是正确的.
实际上,我不明白为什么会发生这种错误...之前,它完美地工作,因为几天它就崩溃了.而且我的代码中没有任何改变.奇怪,不是吗?
编辑:
这是我的签名部分代码.
define ('DATE_FORMAT', 'Y-m-d\TH:i:s\Z');
define('AWS_ACCESS_KEY_ID', 'ABC...'); // My AWS Access Key Id (20 characters)
define('AWS_SECRET_ACCESS_KEY', 'ABCDEF...'); // My AWS Secret Access Key (40 characters)
define('APPLICATION_NAME', 'MyCompany_AmazonMWS');
define('APPLICATION_VERSION', '0.0.1');
define ('MERCHANT_ID', …Run Code Online (Sandbox Code Playgroud) 我需要访问Amazon REST服务,就像前面提到的" Delphi中的HMAC-SHA256 "问题一样.由于这必须在D2010中,我正在尝试使用最新的libeay32.dll来传递RFC 4231中的测试向量:
http://tools.ietf.org/html/rfc4231
有没有人有一个方法,使用这个库在Delphi中传递这些测试?shunty在我提到的帖子中发布的代码传递了前两个测试向量以及第五个,但它在第三和第四个失败.这些向量超过64个字节,因为我需要为Amazon签名的所有url超过64个字节,这是一个问题.我无法弄清楚我做错了什么.OpenSSL测试在hmactest.c中,但它只检查EVP_md5,并且测试向量与RFC中的测试向量不完全相同.我需要这个使用SHA256,所以我可以验证RFC中的测试向量.我正在使用以下常量进行测试(现在为将来的查看者更新常量以修复下面评论中提到的复制和粘贴错误):
const
LIBEAY_DLL_NAME = 'libeay32.dll';
EVP_MAX_MD_SIZE = 64;
//RFC 4231 Test case 1
TEST1_KEY: string = '0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b';
TEST1_DATA: string = '4869205468657265';
TEST1_DIGEST: string = 'b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7';
//RFC 4231 Test case 2
TEST2_KEY = '4a656665';
TEST2_DATA = '7768617420646f2079612077616e7420666f72206e6f7468696e673f';
TEST2_DIGEST = '5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843';
//RFC 4231 Test case 3
TEST3_KEY = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
TEST3_DATA = 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd';
TEST3_DIGEST = '773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe';
//RFC 4231 Test case 4
TEST4_KEY = '0102030405060708090a0b0c0d0e0f10111213141516171819';
TEST4_DATA = 'cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd';
TEST4_DIGEST = '82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b';
//RFC 4231 Test case 5
TEST5_KEY = …Run Code Online (Sandbox Code Playgroud) 我正在开发一个包含两个组件的项目:
1)一个是CodeIgniter框架,我将在其中构建所有自定义代码.
2)另一个是亚马逊用于MWS API的PHP SDK库.
问题是,我的CodeIgniter代码和亚马逊的SDK都需要自己的autoload().
亚马逊的SDK还进一步分为3-4个组件,每个组件都有自己的自动加载功能,所以如果你想在同一个会话中使用产品的SDK,然后使用Reports SDK,你会遇到已定义的自动加载功能.
出于这个原因,我正在考虑建立一个Web服务系统,用于我自己的代码和Amazon的SDK文件之间的通信,即使它们位于同一台服务器上,但至少可以避免命名冲突.即我将向CodeIgniter外部的文件发送HTTP请求,该文件将处理Amazon的SDK,并以JSON或XML返回响应.
我不认为命名空间是一个选项,因为我不想浏览SDK中的每个文件/类并添加命名空间语句.
我的问题是,我应该注意这个方法有任何性能问题吗?除了名称空间之外,还有什么方法可以避免这种方法吗?
我正在使用亚马逊MWS Feeds API将产品添加到亚马逊卖家中央商店.当我使用亚马逊的Feeds API Section Reference中的示例时,产品无需价格即可添加到商店.我添加了以下用于向亚马逊卖家中央商店添加产品的代码.
<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_EXAMPLE_123456</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>TEST1234</SKU>
<StandardProductID>
<Type>ASIN</Type>
<Value>B0EXAMPLEG</Value>
</StandardProductID>
<ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
<DescriptionData>
<Title>Example Product Title</Title>
<Brand>Example Product Brand</Brand>
<Description>This is an example product description.</Description>
<MSRP currency="USD">25.19</MSRP>
<Manufacturer>Example Product Manufacturer</Manufacturer>
<ItemType>example-item-type</ItemType>
</DescriptionData>
<ProductData>
<Health>
<ProductType>
<HealthMisc>
<Ingredients>Example Ingredients</Ingredients>
<Directions>Example Directions</Directions>
</HealthMisc>
</ProductType>
</Health>
</ProductData>
</Product>
</Message>
</AmazonEnvelope>
Run Code Online (Sandbox Code Playgroud)
有谁知道这个问题并告诉我如何修复它以及如何在上面的代码中添加数量?我使用了来自Amazon Feed API参考的代码.
在_POST_PRODUCT_DATA_提要中,"ProductData"节点包含特定于项目所在类别的数据.该项目的类别究竟应该如何映射到XSD,因为它(似乎)不是直接的关系.调用"GetProductCategoriesForASIN"似乎也没有多大帮助 - "类别"的ProductCategoryName是什么?(如下)
<?xml version="1.0"?>
<GetProductCategoriesForASINResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01">
<GetProductCategoriesForASINResult>
<Self>
<ProductCategoryId>166099011</ProductCategoryId>
<ProductCategoryName>Building Sets</ProductCategoryName>
<Parent>
<ProductCategoryId>166092011</ProductCategoryId>
<ProductCategoryName>Building Toys</ProductCategoryName>
<Parent>
<ProductCategoryId>165795011</ProductCategoryId>
<ProductCategoryName>Categories</ProductCategoryName>
<Parent>
<ProductCategoryId>165793011</ProductCategoryId>
<ProductCategoryName>Categories</ProductCategoryName>
</Parent>
</Parent>
</Parent>
</Self>
</GetProductCategoriesForASINResult>
<ResponseMetadata>
<RequestId>0ce91472-4234-4222-8fd8-d56714db18ba</RequestId>
</ResponseMetadata>
</GetProductCategoriesForASINResponse>
Run Code Online (Sandbox Code Playgroud)
简而言之,我真正想知道的是,对于新产品或具有现有ASIN的产品,如何获取类别ID或名称并将其映射到正确的XSD,以便可以返回正确的类别特定选项集.
谢谢.
我使用 Amazon API 已有 2 年多了,并且非常熟悉它。我正在尝试使用报告 API 从亚马逊请求并订购此“_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_”报告,它正在为我生成 ReportRequestID,但从未生成任何报告,并且我在过去 3 天中请求。它的状态一直显示已提交,但从未更新为完成状态。我也尝试过亚马逊 ScratchPad。
我正在请求使用相同报告 API 的许多其他报告,它们工作得非常完美。请告诉我是否有人遇到同样的问题。
这是我用来请求报告的代码:
$sdate = new DateTime('-7 days', new DateTimeZone('UTC'));
$startdate = $sdate->format("Y-m-d\T00:00:00P");
$edate = new DateTime('-1 days', new DateTimeZone('UTC'));
$enddate = $edate->format("Y-m-d\T23:59:59P");
$AWS_ACCESS_KEY_ID = $pos['azn_access_key'];
$AWS_SECRET_ACCESS_KEY = $pos['azn_secret_access_key'];
$APPLICATION_NAME = $pos['azn_app_name'];
$APPLICATION_VERSION = $pos['azn_app_version'];
$MERCHANT_ID = $pos['azn_merchant_id'];
$MARKETPLACE_ID = $pos['azn_marketplace_id'];
$MERCHANT_TOKEN = $pos['azn_merchant_token'];
$pos_name = $pos['nickname'];
$pos_id = $pos['id'];
$serviceURL = $pos['azn_service_url'];
$config = array(
'ServiceURL' => $serviceURL,
'ProxyHost' => null,
'ProxyPort' => -1,
'MaxErrorRetry' => …Run Code Online (Sandbox Code Playgroud) 如何使用亚马逊 MWS或平面文件将内嵌图像添加到注册品牌的产品描述部分?
谢谢!
I went through the guide of for getting setup to call the new SP-API (https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md), and during the process checked off all of the api areas to grant access to (i.e. Orders, Inventory, etc). I am using the C# library provided by Amazon (https://github.com/amzn/selling-partner-api-models/tree/main/clients/sellingpartner-api-aa-csharp). I successfully get an access token and successfully sign the request, but always get the following error: Access to requested resource is denied. / Unauthorized, with no details. I am trying to …
只需发送以下信息:sellingPartnerId、developerId 和 mwsAuthToken
我这样做是httparty这样的:
query = {
sellingPartnerId: "A3Kxxxxx",
developerId: "753xxxx",
mwsAuthToken: "amzn.mws.8abxxxxx-xxxx-xxxx-xxxx-xxxxxx",
}
Run Code Online (Sandbox Code Playgroud)
进而
send = HTTParty.get("https://sellingpartnerapi-na.amazon.com/authorization/v1/authorizationCode",
query: query
)
Run Code Online (Sandbox Code Playgroud)
这将返回以下错误:
{"errors"=>
[{"message"=>"Access to requested resource is denied.",
"code"=>"MissingAuthenticationToken"}]}
Run Code Online (Sandbox Code Playgroud)
我已经对我见过的所有通话进行了调整。我读过以下文章: 这 这
翻阅了 github 上关于此 API 的 695 个问题,仍然没有运气。我已经将查询调整为这个,但也没有运气:
query = {
grant_type: "client_credentials",
sellingPartnerId: "A3K98Oxxxxxx",
developerId: "753xxxxxxxx",
mwsAuthToken: "amzn.mws.8abxxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
client_id: "amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxxxxxx",
client_secret: "a473e76XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
scope: "sellingpartnerapi::migration"
}
Run Code Online (Sandbox Code Playgroud)
我尝试过的任何方法都不起作用..有什么建议吗?有人真正成功地将 MWS 迁移到 SP-API 凭证吗?
Amazon SP-API getorders API 终端节点不会发送该订单的商品。我想在我的库存中显示订单及其商品,就像在亚马逊卖家中心一样。为每个订单调用获取项目(getorderitems 端点)是不明智的。还有其他方法可以实现这一目标吗?
amazon-mws ×10
amazon ×4
php ×3
api ×2
architecture ×1
c# ×1
codeigniter ×1
delphi ×1
hmac ×1
integration ×1