Authentication problem with Wufoo

arrocurbGer

New Member
I set up a Wufoo form with admin only portions that will only show up if I am logged in. I read through the Wufoo API documentation and I can get the authenication to work, but when I try to access the form after I authenticate, it says I need to authenticate. This is what I have so far (subdomain, api key & form id changed)\[code\]<?phperror_reporting(E_ALL);ini_set('display_errors', 1);$curl1 = curl_init('http://fishbowl.wufoo.com/api/v3/users.xml');curl_setopt($curl1, CURLOPT_RETURNTRANSFER, 1);curl_setopt($curl1, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');curl_setopt($curl1, CURLOPT_HTTPAUTH, CURLAUTH_ANY);curl_setopt($curl1, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($curl1, CURLOPT_FOLLOWLOCATION, false);curl_setopt($curl1, CURLOPT_USERAGENT, 'Wufoo Sample Code');$response = curl_exec($curl1);$resultStatus = curl_getinfo($curl1);if($resultStatus['http_code'] == 200) { echo 'success!<br>';} else { echo 'Call Failed '.print_r($resultStatus);}$curl2 = curl_init("http://fishbowl.wufoo.com/api/v3/forms/w7x1p5/entries.json"); curl_setopt($curl2, CURLOPT_HEADER, 0);curl_setopt($curl2, CURLOPT_RETURNTRANSFER, 1);$response = curl_exec($curl2);curl_close ($curl2);echo $response;curl_close($curl1);?>\[/code\]It doesn't matter if I close \[code\]$curl1\[/code\] before or after I call \[code\]$curl2\[/code\], I get the same message on my screen:\[quote\] success! You must authenticate to get at the goodies.\[/quote\]and I know the api, subdomain and form id are all correct.And one last bonus question... can I do all of this using Ajax instead? - the page I will be displaying the form on will already be limited to admin access, so exposing the API shouldn't matter.
 
Top