We are using Threekit Configurations API as per given documentations :
Documentation URL:- https://docs.threekit.com/docs/configurations-api
We are following the below mentioned steps:
1.) When we are calling below mentioned API with bear token and body parameters:
API: https://preview.threekit.com/api/configurations
After API call we are getting the response like:
{
"id": "d185-45c6-9f66",
"productId": "a03c-4f61-a143",
"productVersion": "v1",
"variant": null,
"metadata": null,
"createdAt": "2020-12-19T10:30:17.090Z",
"shortId": "229RzzKH7",
"orgId": "3ca4-4d9d-98fd",
"thumbnail": null,
"customerId": null,
"scope": null,
"identifier": null
}
2.) When we call below code with the value of above response. We are getting 403 forbidden error.
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://preview.threekit.com/api/configurations',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('orgId' => 'orgId=\'3ca4-4d9d\'','productId' => 'a03c-4f61-a143','productVersion' => 'v1','shortId' => '229RzzKH7','files'=> new CURLFILE('/C:/Users/vikram/Pictures/AWCO/side-bar-1935-1940-1.jpg'),'variant' => '','metadata' => '','SKU' => '','customerId' => ''),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {auth_token}'
),
));
Error response:
{
"status": 403,
"code": "forbidden",
"message": "Forbidden"
}
Can you please give us any solution.!
We are trying to do this in WordPress, and even tested using Postman for APIâs response. Attached is the screenshot with debug output.