AnsweredAssumed Answered

Data API : Basic Authorization gives 212 error

Question asked by wfgclapp on Aug 21, 2018
Latest reply on Aug 22, 2018 by beverly

I am trying to get an session token via the FMS17 Data API. I am making my call using cURL from another system.

 

Far as I can tell, I have the syntax correct. And I have double checked that my user:pass is correctly Base64 encoded. But when I make my request using the Authorization: Basic header, I get a response back with error code 212, implying that my credentials are not valid.

 

However, I can send the same request and make it work if, instead of using the Basic auth header, I instead use -u with an explicit user:pass

 

Below are my two calls:

THIS RESULTS IN THE 212 ERROR:

curl -X POST https://mysite.com/fmi/data/v1/databases/ADATA/sessions -H "Authorization: Basic ZmxleGRpZzaV5SMDBMego=" -H "Content-Type: application/json" -d "{}" -o /filepath/result.txt

 

THIS RESULTS IN A SESSION TOKEN:

curl -X POST https://mysite.com/fmi/data/v1/databases/ADATA/sessions -u "username:pass" -H "Content-Type: application/json" -d "{}" -o /filepath/result.txt

 

Can anyone see what I may be missing?

 

Thanks much,

Martin

Outcomes