May Sale! All accounts are 40% off this week.

bboyskiemo17's avatar

"Incomplete Signature" "The request signature does not conform to platform standards" in Lazada API

I working in connecting our system in Lazada and need to retrieve items. this is my code.

$region = "https://api.lazada.com.ph/rest";
$getproductitem = "/products/get";
$app_key = 110150;
$date = new DateTime();
$timestamp = 1656029861000;
$access_token = "token***";
$app_secret = "secret***";
$sign_method="sha256";
$base_str = $getproductitem.'access_token'.$access_token.'app_key'.$app_key.'sign_method'.$sign_method.'timestamp'.$timestamp; 
$sign = hash_hmac('sha256', $base_str, $app_secret, false);
//$sign = hex(sha256($getproductitem.'access_token'.$access_token.'app_key'.$app_key.'sign_method'.$sign_method.'timestamp'.$timestamp));

//return $uri = "https://api.lazada.com.ph/rest/products/get?app_key=$app_key&access_token=$access_token&sign_method=$sign_method&timestamp=$timestamp&sign=$sign";

$response = Http::get($region.$getproductitem,  [
    "app_key" => $app_key,
    "access_token" => $access_token,
    "sign_method" => $sign_method,
    "timestamp" =>  $timestamp,
    "sign" => $sign,
 ]); 

 return $response->json();

but the return is this.

{ "type": "ISV", "code": "IncompleteSignature", "message": "The request signature does not conform to platform standards", "request_id": "212a721616560299294283218" }

I follow the instruction according to their documentation about setting of sign still I got error. thanks for help.

0 likes
2 replies
bboyskiemo17's avatar

@click thank you for answer . I also try this their code but still got same error. $c = new LazopClient($region,$app_key,$app_secret); $request = new LazopRequest('/product/get','GET'); $request->addApiParam('item_id','692345699'); $request->addApiParam('seller_sku','Apple-6S-Black'); var_dump($c->execute($request, $access_token));

Please or to participate in this conversation.