Steve Winter from Matatiro Solutions will be presenting the session “Explore cURL for FileMaker” at the upcoming FileMaker Developer Conference to be held in Phoenix from the 24th to the 27th of July.

Session Description

FileMaker’s robust functionality can be supplemented with a Web Service (or API) to help solve pretty much any task. But sometimes accessing those APIs through http(s) doesn’t provide the flexibility needed. One example of this is if you need to send custom authentication headers or to use a protocol other than HTTP.

In this session, you’ll begin to explore cURL for FileMaker. Developers in other ecosystems have long been able to call on the power of cURL and you’ll learn how to make it work for you.

Session Objectives

  • Accessing external APIs using InsertFromURL and cURL parameters
  • How and why to access protocols other than HTTP with cURL
  • Implementing simple sync using cURL and the FileMaker REST API
  • What OAuth is, why it matters, and how to make it work in FileMaker

Session resources

Resources for the session are attached so that attendees may ‘follow along’ in the demo file.

  • INN004 Demo file.fmp12.zip is the main file I used on my laptop
  • INN004 Mobile.fmp12.zip is the file I should have used on my phone (I’d opened the wrong one!). Use the layout Phone > Contact details. Tap the traffic lights to sync. Put a file in the container and select Send to Dropbox to see the Dropbox upload functionality work.
  • INN004.pdf are the slides.
  • APISourceCode.zip is the PHP source code for the API used in the first demo, and for signing the JWT for Google integration
4 Comments
  • Hi Steve I was wondering is you could help me use cURL to access data on a website through its API. I’m not quite familiar with cURL. The serviceprovider sent me a cURL example based on PHP that looks like this:

    $login = ‘LOGIN’;
    $password = ‘PASSWORD’;
    $url = ‘https://www.factuursturen.nl/api/v1/products’;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, “$login:$password”);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Accept: application/json’));
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);

    as an example.

    If I could figure out how to make that work in e FileMaker script that would be great!

    Thanks!

    September 28, 2018 at 12:01 pm
  • Hi Steve

    Thanks for providing a most informative presentation.

    I have been struggling for a whole day with InsertFromURL and particularly the cURL parameters in an attempt to interact with a platform called Jitterbit.

    I was just about to give up and use the good old BaseElements plugin when I came across your DevCon session. The bit where you explained how to use FileMaker variables in quoted text by prefixing with an @ symbol “-d @$data” has saved me hours of frustration.

    Thanks so much for that nugget of valuable information and the other useful tips provided.

    All the very best
    Paul

    March 17, 2019 at 5:40 pm
  • Luis says:

    Hi Steve, Luis here from Spain.
    Thanks a lot for the presentation and the Demo file you prepared for the Devcon 17 about cURL, it has now clarified many things.

    I have been now struggling for more than a week with something which seems pretty simple…. a way to upload a file to Google Drive with metadata, this is a multipart file, but I can’t figure out how to set the proper code for the $options so it will take the boundaries and the mimes. Do you have any example on how to code the curl on Filemaker to perform the call for Google Drive API v3 correctly?
    While there are a lot of examples and demos out in the community about Gmail and Calendar integration, and Dropbox, I can’t find anything on Google Drive API

    Thanks a lot for your feedback!

    April 9, 2020 at 8:04 am
  • Hi Luis

    I’ve not tried integrating the Google Drive API from within FileMaker.

    A quick look at the docs suggests this might be a good way forward https://developers.google.com/drive/api/v3/manage-uploads#resumable since you can send your metadata first, then make a second request with the content – interestingly the docs also say:

    > Resumable upload: uploadType=resumable. For more reliable transfer, especially important with large files. Resumable uploads are a good choice for most applications, since they also work for small files at the cost of one additional HTTP request per upload.

    Which makes it sound like a good idea anyway. I’ll see if I can put together a PoC for you.

    Cheers
    Steve

    April 10, 2020 at 12:28 pm

Leave A Comment

*
*