AliExpress SDK API 调用 aliexpress.affiliate.productdetail.get 服务抛出错误“请求签名不符合平台标准”

问题描述 投票:0回答:1

我将 AliExpress Affiliate API 与官方 AliExpress SDK 结合使用,以连接

aliexpress.affiliate.productdetail.get
服务(文档参考),该服务只不过是 GET 查询。

我能够得到

access_token
,如参考文献所示。现在我尝试连接服务
aliexpress.affiliate.productdetail.get
但出现以下错误:

{ "type": "ISV", "code": "IncompleteSignature", "message": " 请求签名不符合平台标准", “request_id”:“123456789”}

修复错误的步骤


我确实知道ISV错误是什么意思,这是一个业务错误代码,但这个错误没有意义,因为我正在使用有效的access_token并非常仔细地遵循API说明。我尝试过使用不同的新鲜 access_token 来避免使用过期的令牌,但是似乎没有任何效果,一遍又一遍地出现相同的错误消息。

用于连接到服务的 PHP 代码片段


<?php

$aliExpressPath = 'aliexpress.affiliate.productdetail.get';
$this->iopClient = new IopClient($this->getEndPointUrl(), $this->getAppKey(), $this->getAppSecret());
$request = new IopRequest($aliExpressPath);

$request->addApiParam('access_token', $this->getAccessToken());
$request->addApiParam('product_ids', '1005006454556640,1005006591162504');
$response =  $this->iopClient->execute($request, $this->getAccessToken());

?>

注意:我使用的是正确的键,例如

App Secret
App Key
Access Token
(我知道它们工作正常,因为我能够创建新令牌)。

预期结果


关于该服务的主要功能,我希望收到请求中提供的IDS的产品信息(1005006454556640和1005006591162504)。例如,我期待如下内容:

{
  "code": "0",
  "resp_result": {
    "result": {
      "current_record_count": "200",
      "products": [
        {
          "app_sale_price": "300",
          "original_price": "300",
          "product_detail_url": "https://www.aliexpress.com/item/33006951782.html",
          "product_small_image_urls": [],
          "second_level_category_name": "Women\u0027s Clothing",
          "target_sale_price": "320.2",
          "second_level_category_id": "333333",
          "discount": "50%",
          "product_main_image_url": "https://ae01.alicdn.com/kf/HTB1tyl7bELrK1Rjy0Fjq6zYXFXaC/Spring-Autumn-mother-daughter-dress-matching-family-outfits-mother-kids-dress-matching-outfits-flamingo-embroidery-1.jpg",
          "first_level_category_id": "1111",
          "target_sale_price_currency": "USD",
          "target_app_sale_price_currency": "USD",
          "original_price_currency": "USD",
          "platform_product_type": "ALL",
          "shop_url": "https://www.aliexpress.com/store/3255036",
          "target_original_price_currency": "USD",
          "product_id": "33006951782",
          "target_original_price": "360.5",
          "product_video_url": "https://ae01.alicdn.com/kf/HTB1tyl7bELrK1Rjy0Fjq6zYXFXaC/Spring-Autumn-mother-daughter-dress-matching-family-outfits-mother-kids-dress-matching-outfits-flamingo-embroidery-1.jpg",
          "first_level_category_name": "dress",
          "promotion_link": "http://s.click.aliexpress.com/e/xxxxx",
          "evaluate_rate": "89.22%",
          "sale_price": "15.9",
          "product_title": "Spring Autumn mother daughter dress matching family outfits mother kids dress matching outfits flamingo embroidery 1 to 11 yrs",
          "hot_product_commission_rate": "60%",
          "shop_id": "111111",
          "app_sale_price_currency": "USD",
          "sale_price_currency": "USD",
          "lastest_volume": "300",
          "target_app_sale_price": "330.3",
          "commission_rate": "3.5%",
          "promo_code_info": {
            "code_campaigntype": "1",
            "code_availabletime_end": "2020-04-30 23:59:59",
            "code_quantity": "1",
            "code_availabletime_start": "2020-04-01 00:00:00",
            "code_value": "On order over USD 10, get USD 7 off",
            "promo_code": "GMG20207",
            "code_mini_spend": "1",
            "code_promotionurl": "https://s.click.aliexpress.com/e/_xxxxx"
          },
          "relevant_market_commission_rate": "10%"
        }
      ]
    },
    "resp_code": "200",
    "resp_msg": "success"
  },
  "request_id": "0ba2887315178178017221014"
}

我想知道是否还需要做其他事情才能成功连接该服务。谢谢。

php sdk aliexpress
1个回答
0
投票

这将包含速卖通团队对我打开的票作出回复后的答案...

© www.soinside.com 2019 - 2024. All rights reserved.