I have tried but no success. I tried also different options but response is throwing 401 or there is no response. In API docs all I have is basic instructions, and as you may imagine I am new to cURL.
API Docs: https://docs.sendcloud.sc/api/v2/index.html?shell#get-all-parcels
Here is the code I have so far:
$url = "https://panel.sendcloud.sc/api/v2/parcels";
// Initiate curl
$ch = curl_init();
// Set the url
curl_setopt($ch, CURLOPT_URL,$url);
// Disable SSL verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Will return the response, if false it print the response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute
$result=curl_exec($ch);
// Closing
curl_close($ch);
$arr = json_decode($result, true);
print_r($arr);
Thanks.