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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -