cURL to add record error not a valid form, but form exists....????
I am attempting to add a record to a form but I keep getting an error stating that the form does not exist, although I know it does, and yes I'm using the linkname, not the form name in my URL.
- $data = array(
- ‘authtoken’ => xxxxxxxxxxxxxxxxxx,
- ‘scope’ => creatorapi,
- ‘names’ => bob,
- ‘total’ => 12.50
- );
-
- # Create a connection
- $url = 'https://creator.zoho.com/api/xxxxxuser/xml/test/form/this_form/record/add/';
- $ch = curl_init($url);
- # Form data string
- $postString = http_build_query($data, '', '&');
- # Setting our options
- curl_setopt($ch, CURLOPT_VERBOSE, 1);//standard i/o streams
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);// Turn off the server and peer verification
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//Set to return data to string ($response)
- curl_setopt($ch, CURLOPT_POST, 1);//Regular post
- # Get the response
- $response = curl_exec($ch);
- curl_close($ch);
I've checked it a thousand times, i dont understand why I am getting this error. user has permissions....any help greatly appreciated...
Chris