Try 30 days of free premium.

Filemaker Authorisation

lycanthrope7 wrote 7 years ago: 1

You'll be pleased to know that I finally figured it out. I had to use a Filemaker Pro plug-in to get it to work, but it works. If you ever have anyone else using Filemaker, who has the same problem, feel free to contact me for the solution. Thanks again for trying to help.


Jan wrote 7 years ago: 1

congrats on getting it to work lycanthrope. Feel free to be pro-active with sharing what you've done. :)

lycanthrope7 wrote 7 years ago: 1

Ok then, I used the BaseElements plugin which can be found here, along with all the documentation on how to use it. It has a set of functions that are specifically designed to be used with API's and sending cURL. The functions I used were BE_Curl_Set_Option, BE_HTTP_Set_Custom_Header & BE_HTTP_PUT_DATA. All I needed to do was set a variable (or field) to contain the following calculation:

----------------------------

//Use "Basic" Authentication

BE_Curl_Set_Option ( "CURLOPT_HTTPAUTH" ; 1 ) &

//Set headers

BE_HTTP_Set_Custom_Header ( "Content-Type" ; "application/json" ) &

BE_HTTP_Set_Custom_Header ( "Accept" ; "application/json" ) &

//Send data

BE_HTTP_PUT_DATA ( $url ; "{\"episode_no\":0,\"marked_at\":0,\"type\":0}" ; "lycanthrope7" ; "apikey" )

----------------------------

Note that $url is a variable that contains the endpoint, and the bit after it can be altered to suit whatever data you're sending.

Try 30 days of free premium.