Jump to content

CURL Authentication Failure


This topic is 2500 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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? 

Link to comment
Share on other sites

This topic is 2500 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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