AnsweredAssumed Answered

Authurisation with Wofoo forms

Question asked by michaelkirwan on Jan 16, 2018
Latest reply on Jan 16, 2018 by michaelkirwan

Hi all

I can retrieve entries from a Wofoo form using a simple Https:// request like this sample: https://joebloggs.wufoo.com/api/v3/forms/4j5y5ggh5gg5g/entries.json

This works great while I am physically logged it to the Wofoo website and open a new browser. However if submit this request while not logged in, the response comes back… with a security window see below, which has to be filled if before I can proceed. So my script in FileMaker would fail at this point.

You must authenticate to get at the goodies”

I contacted Wofoo help to see how I can integrate my credentials into the Url. Short answer is it can’t be done (except through cuch things as cURL or a php script)

I looked at the documentation and found this sample in cURL: the "AOI6-LFKL-VM1Q-IEX9":"footastic" being the username and password

curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" https://fishbowl.wufoo.com/api/v3/forms.json

 

the Php version is like this:

 

<?php

$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms.json');

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');

curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);                         

curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);                          

curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');

 

$response = curl_exec($curl);

$resultStatus = curl_getinfo($curl);

 

if($resultStatus['http_code'] == 200) {

    $json = json_decode($response);

    echo json_encode($json, JSON_PRETTY_PRINT);

} else {

    echo 'Call Failed '.print_r($resultStatus);

}

 

 

My problem is how I can run either of these requests in a script in filemaker?

 

Many thanks… Michael

Outcomes