xml - Coop API - posting with PHP -
i'm trying simple post web service using curl , api i'm getting 422 response. 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 existing curl library handle posts. i'm sure has way i'm formatting post url (i've tried bunch of different ways) or way i'm posting data.
their docs here: http://coopapp.com/api/statuses
thanks!
here's quote api page
post /statuses/update.xml?group_id=#{group_id}&status=an%20encoded%20status&key=#{secret_key}
its supposed key not secret_key
$postdata = array(     'group_id' => $group_id,     'key' => $secret_key,     'status' => 'test' );      
Comments
Post a Comment