On FME Server 2017 Rest API V3, the header token based authentication always fails. I am setting the header based on this documentation: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html
For example:
curl -X GET -H "Content-type: application/json" -H "Accept: application/json" \
-H "Authorization: fmetoken token=abc123456789" \
'http://myfmeserver/fmedatastreaming/metering/meterping.fmw?meterid=123456'
receives the following error:
The request has not been applied because it lacks valid authentication credentials for the target resource.
But, using the token in a query param works:
curl -X GET -H "Content-type: application/json" -H "Accept: application/json" \
'http://myfmeserver/fmedatastreaming/metering/meterping.fmw?meterid=123456&token;=abc123456789'
Also basic auth with an Authorization header works:
curl -X GET -H "Content-type: application/json" -H "Accept: application/json" \
-H "Authorization: Basic mybase64digest=" \
'http://myfmeserver/fmedatastreaming/metering/meterping.fmw?meterid=123456'
I checked CORS to make sure it was allowing Authorization headers, is there another configuration I need to check? Any help would be greatly appreciated!