API Response

API Response

I'm testing the ZC api to add a record. It's working, but the response is always "Resource id #1"

Here's the php code (with items chenged to hide actuals). How can I echo the actual json response?

  1. <?php
  2. {
  3. $PETS="Cat, Dog, Bird";

  4. $url = 'https://creator.zoho.com/api/buzzap/json/xxxyyy/form/zzzz/record/add/';
  5. $fields .= '&authtoken=yaddayaddayadda123456';
  6. $fields .= '&scope=creatorapi';
  7. $fields .= '&PETS='.$PETS;

  8. $ch = curl_init();
  9. curl_setopt($ch, CURLOPT_URL, $url);
  10. curl_setopt($ch, CURLOPT_POST, TRUE);
  11. curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
  12. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  13. curl_exec($ch);
  14. curl_close($ch);
  15. echo $ch;
  16. }
  17. ?>

Cheers,
John Whitney