Rest Api

Hello!

i m trying to update a custom field via the rest api.
My code is:
$endpoint =“https://api.infusionsoft.com/crm/rest/v1/contacts/8651?access_token=".$token["access_token”];
$log_output;
$log_vars;
$myObj->id = 27;
$myObj->content = “blabla”;
$obj = json_encode(array(‘custom_fields’ => array($myObj)));

exec(“curl -X PATCH '” . $endpoint . " -H ‘Content-Type: application/json’ -H ‘Accept: application/json’ -d ‘".$obj."’ --include", $log_output, $log_vars);

Whenever i try this call by the shell all it is ok , but when the call is executed by php exec there is no answer… why?

I would guess that there is an encoding issue with how your combined string is being passed to the exec function; could you output it to check? (masking the access token, please)