I'm using AliExpress Affiliate API combinated with the official AliExpress SDK in an effort of connecting with the aliexpress.affiliate.productdetail.get
service (docs reference) which is not more than a GET query.
I was able to get an access_token
as the reference indicates. Now I'm trying to connect with the service aliexpress.affiliate.productdetail.get
but I'm getting the following error:
{ "type": "ISV", "code": "IncompleteSignature", "message": "The request signature does not conform to platform standards", "request_id": "123456789" }
Steps for fix the error
I'm truly aware what does ISV error means, which is a business error code, but it doesn't make sense the error because I'm using a valid access_token and following API instructions very carefully. I have tried with different fresh access_token in a try for avoiding using expired tokens, however nothing seems to be working, falling in the same error message over and over.
PHP Snippet for connecting to the service
<?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());
?>
Note: I'm using the proper keys such as App Secret
, App Key
, and Access Token
(I know they're working fine because I'm able to create new tokens).
Expected results
Regarding the main functionallity of the service, I'm expecting receiving the products info of the IDS provided in the request (1005006454556640, and 1005006591162504). For example, I'm expecting something as follows:
{
"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"
}
I would like to know if there's something else that I need to do in the effort of connecting successfully with the service. Thank you.
I have resolved my issue changing the endpoint, I was using the System interfaces endpoint instead of a Business interfaces.
According with AliExpress docs:
System interfaces: Authorization relative APIs under 'System Tool' in the API documentation (https://api-sg.aliexpress.com/sync?method={api_path}&{query}).
Business interfaces: All other APIs except system APIs which mentioned above (https://api-sg.aliexpress.com/rest{api_path}?{query}).
Conclusion
I was using the wrong endpoint (System interfaces instead Business intrfaces) System Interfaces endpoint is used for authorization only (services which creates token or refresh them). Business Interfaces endpoint is used for the rest of API services, such as the one I tried to connect with.