I'm trying to do a simple post to a web service using CURL and their API but I'm getting a 422 response. My code looks like:
include 'CurlRequest.php';
$secret_key = 'mykeyhere';
$group_id = 'group_id';
$postData = array(
'group_id' => $group_id,
'key' => $secret_key,
'status' => 'test'
);
$curl = new CurlRequest('http://coopapp.com/statuses/update.json');
$curl->exec(array(
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($postData)
));
I'm using an existing Curl Library to handle the posts. I'm sure it has something to do with the way I'm formatting the POST url (I've tried a bunch of different ways) or the way I'm posting the data.
Their docs are here: http://coopapp.com/api/statuses
Thanks!