Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CURL Authentication Failure

Featured Replies

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? 

  • Author

Problem solved. 

 

Use \" rather than '

 

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.