POST API down?

42 views
Skip to first unread message

Felix Niklas

unread,
Jun 17, 2014, 7:18:51 AM6/17/14
to change-...@googlegroups.com
Hello,

using the provided php code to sign a petition I don't get any response from the API. Not a result nor an error. 

I'm using the default base_url and endpoint:
$base_url = "https://api.change.org";
$endpoint = "/v1/petitions/$petition_id/signatures";

I added additional CURL parameters I found in vbuck's change-js-api proxy:
curl_setopt_array($curl_session, array(
  CURLOPT_HEADER => false,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_URL => $url,
  CURLOPT_HTTPHEADER => array('Content-Type: application/x-www-form-urlencoded'),
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $data
));

I also added to close the curl request after execution:
curl_close($curl_session);

Still, echo $result; returns nothing.

I initially planned to use change-js-api but I didn't get it to work with signing using the php proxy. Last time I used it a week ago I at least got a 'Invalid request signature' response. It also doesn't get a respond right now:



Felix Niklas

unread,
Jun 17, 2014, 7:30:30 AM6/17/14
to change-...@googlegroups.com
False alarm – seems as if my local cURL is bugged. Running it from a server I got a response.
Reply all
Reply to author
Forward
0 new messages