Skip to main content

Hi FME lovers,

I'm getting blocked when trying to access this website, via POST:

https://lastkajen.trafikverket.se/api/Identity/Login

 

Using HttpCaller from FME 2022.2, I have:

HttpCaller settingsBut, no luck, a http_status_code = '400' is sent.

 

On the other hand, I've had no issues using Postman:

 

postman 

I guess I'm not filling well the HttpCaller settings, right?

 

Thanks!

I think the body in the HTTPCaller is incorrect. Try

UserName=xxx&Password=xxx

 


Thanks @nielsgerrits​  for your quick reply,

I've tested with:

  • UserName=XXX&Password=XXX

and works perfectly, thanks for the tip!! ;)

 


To build on @nielsgerrits​ response, it looks like the API your using requires the input encoded as a form (which is what Niels gave you). What you initially had is JSON, so for some APIs, JSON encoding is valid (you'd need to make sure you set the content type to JSON in those cases)


FYI - I created a web connection and published to the hub for authorization for this service:

https://hub.safe.com/publishers/nordpil/web-connections/trafikverket-lastkajen-api


Reply