Hi,
we have a lot "errors" while parsing the response. Maybe there are unexpected bom characters (the response was successful).
...
$ac = new ActiveCampaign(
$settings['apiUrl'], $settings['apiKey']
);
$result = $ac->api('contact/sync', $data);
...
Log:
[26-Jun-2020 15:00:04 UTC] PHP Fatal error: Uncaught RequestException: An unexpected problem occurred with the API request. Some causes include: invalid JSON or XML returned. Here is the actual response from the server: ---- {"subscriber_id":675408,"sendlast_should":0,"sendlast_did":0,"result_code":1,"result_message":"Kontakt hozz\u00e1adva","result_output":"json"} in /vendor/activecampaign/api-php/includes/Connector.class.php:356
Stack trace:
2 /vendor/activecampaign/api-php/includes/ActiveCampaign.class.php(169): AC_Contact->sync( in /vendor/activecampaign/api-php/includes/Connector.class.php on line 356
Package: activecampaign/api-php Version: v2.0.3
Hi, we have a lot "errors" while parsing the response. Maybe there are unexpected bom characters (the response was successful).
... $ac = new ActiveCampaign( $settings['apiUrl'], $settings['apiKey'] );
$result = $ac->api('contact/sync', $data); ...
Log: [26-Jun-2020 15:00:04 UTC] PHP Fatal error: Uncaught RequestException: An unexpected problem occurred with the API request. Some causes include: invalid JSON or XML returned. Here is the actual response from the server: ---- {"subscriber_id":675408,"sendlast_should":0,"sendlast_did":0,"result_code":1,"result_message":"Kontakt hozz\u00e1adva","result_output":"json"} in /vendor/activecampaign/api-php/includes/Connector.class.php:356 Stack trace:
0 /vendor/activecampaign/api-php/includes/Connector.class.php(321): AC_Connector->throwRequestException('\xEF\xBB\xBF\xEF\xBB\xBF{"subscri...')
1 /vendor/activecampaign/api-php/includes/Contact.class.php(87): AC_Connector->curl('https://r...', Array)
2 /vendor/activecampaign/api-php/includes/ActiveCampaign.class.php(169): AC_Contact->sync( in /vendor/activecampaign/api-php/includes/Connector.class.php on line 356