Hi @cob.pthompson, thanks for your question. Are you able to share any of the details of the successful API call from Postman? Perhaps a comparison can help narrow down the problem in the HTTPCaller.
Thanks,
Nathan
The sample request in the docs only have deviceName, username and password in the json. Did you manage to replicate the request with the exact same piece of json in Postman? According to the documentation a 400 - Bad Request means Invalid JSON input.
What version of FME do you use? I have had some problems with passwords not being URL encoded in 2016. TextEncoder(URL (Percent Encoding) ) fixed this. Seems to be gone in 2018.
Also, you set Content-Type twice. (Header and Content Type field.) I think the header overrules the field but try removing one of those.
I agree with @nielsgerrits, the status 400 is a server-side error and not a client (FME) error. Trying to reproduce the example from the documentation would be a good first step.
The sample request in the docs only have deviceName, username and password in the json. Did you manage to replicate the request with the exact same piece of json in Postman? According to the documentation a 400 - Bad Request means Invalid JSON input.
What version of FME do you use? I have had some problems with passwords not being URL encoded in 2016. TextEncoder(URL (Percent Encoding) ) fixed this. Seems to be gone in 2018.
Also, you set Content-Type twice. (Header and Content Type field.) I think the header overrules the field but try removing one of those.
When I replicate the exact JSON request in Postman I received a valid token back. I removed the Environment and Role values and the request works in Postman but not in FME 2018.
I have put the body of the request through the JSONValidator and the response was success.
I am new to FME and we have the latest version of 2018.
I removed the Content-Type form individually form each section and both gave the same 400 error.
Hi @cob.pthompson, thanks for your question. Are you able to share any of the details of the successful API call from Postman? Perhaps a comparison can help narrow down the problem in the HTTPCaller.
Thanks,
Nathan
Here are my settings from Postman.
Results
Header Info
Body Info
Hi @cob.pthompson,
It's possible that you need to tell FME what format the incoming data will be in. Try adding the Header:
Name = Accept
Value = application/json
In addition as @nielsgerrits mentioned you do not need the Content-Type Header because this has already been set up in the 'Body' section.