**Please i’m geting error when try this php json requet to get and show data . i need help
Here is the request:**
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://domain/api/customers/2180',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authtoken: eyJ0eXAiOiJKV1QiLCJh'
),
));
$response = curl_exec($curl);
curl_close($curl);
$datas = json_decode($response);
echo $datas;
Here is the error : Recoverable fatal error: Object of class stdClass could not be converted to string in …..
here is api documentation: https://perfexcrm.themesic.com/apiguide/#api-Customers-GetCustomer
Please help me
**Please i’m geting error when try this php json requet to get and show data
New contributor
olivier is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.