I’m not a web developer, so I’ve been fumbling together some PHP with curl.
I eventually figured out curl was erroring out with the message below:
[errmsg] => SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
$url = "https://api.spark.io/v1/devices/MYDEVICE/function"; $ch = curl_init( $url ); curl_setopt($ch, CURLOPT_POSTFIELDS,"access_token=XXX&args=W"); $content = curl_exec( $ch ); $err = curl_errno( $ch ); $errmsg = curl_error( $ch ); $header = curl_getinfo( $ch ); curl_close( $ch );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
And things work now.
Any idea why?