Jump to content
liamob1

Google authentication (Without a plugin)

Recommended Posts

liamob1    0

I'm looking for a method of authenticating with google via FileMaker. I would like to run post commands via the Insert from URL command to allow my FMDB to publish Cal Events to a specific calendar. Realistically I'd want this to be automatic when an appointment is assigned on the system. 

At the moment, I can get a post to work, but it returns an error. I imagine this is because the authentication hasn't taken place. 

Has anyone managed to get a working OAuth 2.0 setup/Google Login on Filemaker that will work with POST and GETs. 

Once I've got Calendar to work, then I want to start on Drive and Gmail. 

Thanks! :)

Share this post


Link to post
Share on other sites
Wim Decorte    456

There are a few plugins that can help you here.  A good one is the free BaseElements one.

The 'insert from url' can take you a fair part of the road but it does not allow you for instance to set the custom headers for an HTTP POST that are usually required for interacting with such an API.

Share this post


Link to post
Share on other sites
liamob1    0
31 minutes ago, Wim Decorte said:

There are a few plugins that can help you here.  A good one is the free BaseElements one.

The 'insert from url' can take you a fair part of the road but it does not allow you for instance to set the custom headers for an HTTP POST that are usually required for interacting with such an API.

 

I've been using the insert from URL for the POST and GET communication, however, I'm getting a bad request return from Google because of the authentication. It's literally the OAuth I need to calculate. 

One thing I should mention is, we want this to work on iPads, using Go? I'm starting to wonder if its going to be possible. 

Share this post


Link to post
Share on other sites
Wim Decorte    456

You may be able to do it using javascript in a web viewer on Go, or you can use PSoS and use a plugin server-side.

You can't do oAuth authentication through the "insert from URL", because of what I mentioned: you can't set the custom headers that are required.

Share this post


Link to post
Share on other sites
liamob1    0
Just now, Wim Decorte said:

You may be able to do it using javascript in a web viewer on Go, or you can use PSoS and use a plugin server-side.

You can't do oAuth authentication through the "insert from URL", because of what I mentioned: you can't set the custom headers that are required.

 

I see!! I've not played with POST and GET commands much until now. I will attempt something with those two methods. 

Thanks for your help!

Share this post


Link to post
Share on other sites
rwoods    9

You can use 'Perform Script on Server', and have the plug-in installed on the server, to get around the fact that FM Go does not support plug-ins.

Or you could wait for FM 16 since FMI's roadmap shows built-in support for the commands that you are currently relying on the plug-in for. They say they will include 'Enhanced cURL options — Provides cURL options to configure HTTP/HTTPS calls that work with REST APIs.' in the next version.

Share this post


Link to post
Share on other sites
liamob1    0
1 minute ago, rwoods said:

You can use 'Perform Script on Server', and have the plug-in installed on the server, to get around the fact that FM Go does not support plug-ins.

Or you could wait for FM 16 since FMI's roadmap shows built-in support for the commands that you are currently relying on the plug-in for. They say they will include 'Enhanced cURL options — Provides cURL options to configure HTTP/HTTPS calls that work with REST APIs.' in the next version.

 

Music to my ears!! I might have to just wait for a little while. I have enough to develop in the mean time! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Who Viewed the Topic

  • Similar Content

    • By troi
      Internet plug-in adds new script steps and online help for FileMaker Pro 16.
       
      Alphen aan den Rijn, Netherlands, June 26, 2017–Troi today announced the immediate availability of Troi URL Plug-in 5.0 for FileMaker Pro 16.
       
      What is Troi URL Plug-in?
      Troi URL Plug-in can help you fill in forms on the Internet, all from FileMaker Pro. It also retrieves data or images from web sites.
      - use the POST command to fill in a web form and retrieve the result directly in FileMaker Pro
      - use the GET command to retrieve data
      - use the PUT command to to transfer files or upload data to web servers
      - use the DELETE command to delete items on web servers
      - use a secure connection (HTTPS) using SSL
      - get access to password protected web pages, including those that require OAuth authorization
      - get JPEG, PNG and GIF images directly into a container field
      - specify cookies and proxy server settings
      - send tweets to Twitter with ease!
       
      What is new in version 5.0?
      We rewrote Troi URL Plug-in for FileMaker 16 and it now has the following new functionality:
      - Tested and made compatible with FileMaker Pro 16.
      - Added new functionality to the TURL_Get function. When getting images, like jpegs the name of the image (like for example img_4321.jpg) is now also added to the container data.
      - Fixed a problem with creating the correct OAuth signature for parameters in the TURL_SendAuthorizedRequest function.
      - Fixed a problem with the TURL_SendAuthorizedRequest function for urls that contain extra parameters (after a question mark: like www.example.com?page=1).
      - Made various minor changes to the example files to better work with FileMaker Pro 16.
      - Updated the code by adding improved namespace handling to make the plug-in more robust.
       
      Extra features when running FileMaker Pro 16
      Version 5.0 adds the following new features when running in FileMaker 16:
      - The URL Plug-in adds multiple script steps when running in FileMaker Pro 16. You can select these script steps in the script steps pane in Script Workspace, or you can begin typing the script step name, then choose the script step from the list that appears. The script steps significantly expand the possible actions you can perform with FileMaker Pro. Only steps that perform an action have been added as a script step. Functions that just return information (like for example TURL_GetLastHTTPStatusCode) are only available as an external function.
      The following seven script steps are added:
           - Delete URL
           - Get URL
           - Post URL
           - Put URL
           - Reinitialize URL Plug-in
           - Send Authorization PIN URL
           - Send Authorized Request URL
      - Added new scripts to several example files, which demonstrate how to use the new external script steps of FileMaker Pro 16. The examples check if FileMaker Pro 16 is running and will select these new scripts.
      - Added support for online help for the functions and script steps of the plug-in. You can now easily get online help from the Troi website, by clicking the Help button (the small question mark button) next to the function description in the functions pane or the script step description in the script steps pane.
       
      Apart from these additions we fixed several bugs and made various further improvements. More detailed information on all changes and improvements implemented in Troi URL Plug-in 5.0 can be found at: https://www.troi.com/products/urlplugin/
       
      Pricing & Availability
      A fully functional demo version of Troi URL Plug-in 5.0 is available for downloading at: https://www.troi.com/products/urlplugin/
      Licenses cost US$ 79 per user. Details on developer licenses and multi-user discounts can be found on our web site. You can order licenses from our web site.
       
      Upgrade information
      Version 5.0 needs a new registration. The upgrade is free for users who bought a license for Troi URL Plug-in on or after May 24, 2016. Eligible users will be sent a new registration. Contact us if you have not received yours after June 30, 2017.
      Upgrades from licenses bought before May 24, 2016 are available from US$ 49 per user. Upgrade prices for other licenses can be found on our web site. You can order upgrades from our web site.
       
      Contact information
      D. Budding
      Troi Automatisering
      Newsroom: https://www.troi.com/news/
    • By fmgenius
      I am trying to do a basic Insert from URL call with some CURL headers added and I keep getting authentication errors. This is the curl command sent by the provider for me to use. 
       
      curl -X GET --header 'Accept: application/json' --header 'api_key: 1234567890abcdefg' 'https://mydomain.leaddocket.com/api/endpoint' This is the curl I am setting up
      -X GET \ --header 'Accept: application/json' \ --header 'api_key: 1234567890abcdefg' \ -trace $$curlTraceDump FM barks and says "Authentication Failed" but if I do this with the BaseElements plugin, it works just fine. 
      What I found when looking at the Curl Trace was that FM is dropping some of the headers I send and injecting its own. Here's the snippet I am finding from FM's trace:
      GET /api/Leads/P endingExportIds HTTP/1.1 Host: mydomain.leaddocket.com User-Agent: FileMaker/16.0 Accept: */* Accept-Encoding: deflate, gzip Notice: both headers I sent were stripped and replaced. 
      Here is the response from BaseElements trace
      GET /api/endpoint HTTP/1.1 Host: mydomain.leaddocket.com User-Agent: libcurl-agent-base-elements-plugin/3.3.4 Accept: application/json api_key: 1234567890abcdefg BE left my headers intact. 
       
      So what gives? 
    • By GEORGL03
      Good afternoon everyone,
       
      Some BackStory:
      When FMCloud was first announced, I was ecstatic; I'm all for moving towards cloud technology for my agency. I was nearly there...about to pull the trigger and start a migration scheme from my current setup into the FMCloud, but then the one big caveat was found..
      "Supports custom app authentication via FileMaker user accounts only" AKA no External Authentication. But that is fine, I understand it was released for small businesses which need the scalability of AWS, but this DOES NOT work for my agency. I spent half a year moving away from filemaker user accounts, I can't go back; plus they have a Single Sign-on initiative that I'm trying to meet.
       
      But I still need to get off of my old physical towers.So my next idea is that I want to spin up an EC2 in AWS and put filemaker server on it as an alternative, but I can't find any verbiage that details how that works(or if it works) in the way that I would like. Namely, I need my AWS server to talk to Active Directory, preferably by ADFS or SAML (lesser so).
       
      So the question:
      Can I setup external Authentication to an Active Directory from a server being hosted on AWS that is housing FileMaker Server 15? If so, What should I make note of before diving into this?
       
      Thanks for any help and clarification someone can provide.
       
      ~Levi
    • By liamob1
      Does anybody know a way of directly attaching a file to gmail (via the webclient) using mail to or via the send email functions. We have multiple users that move around the building so setting up outlook for each user is becoming a nightmare. They use iPads so the send mail script function works here, but on a desktop we would like it to force open GMail or use Mailto: and take the attachment with it. I've tried everything i know about mailto and i'm at a dead end. 
      I did think about trying to integrate google drive HOWEVER i have no experience with Googles API's. 
    • By dbservices
      Do you travel a lot for your job and need the best route possible to save time and money? Learn how to connect your FileMaker solution with the Google Maps Directions API for route optimization! Free sample file and video included. 
      https://www.dbservices.com/articles/filemaker-google-route-optimization/

       
      David Happersberger
      www.dbservices.com 
×

Important Information

By using this site, you agree to our Terms of Use.