Solved

how to call curl command in HTTPCaller

  • 28 June 2019
  • 3 replies
  • 49 views

Badge

Hello Team,

Can somebody help me to call following curl command through HTTPCaller?

curl --user <consumer_key>:<consumer_secret>         -X POST https://identity.trimble.com/token
        -H 'Content-Type: application/x-www-form-urlencoded'         -d 'grant_type=password&username=<user_email>&password=<password>&scope=openid&tenantDomain=trimble.com

If possible can provide one example, Following command we are going to use to generate Token Id.

 

Thanks..

 

icon

Best answer by nielsgerrits 28 June 2019, 10:59

View original

3 replies

Userlevel 6
Badge +31

Can not check exactly because we don't have the username, password and redirect_uri, but it should work with something like this. I think it will work when you replace username, password and redirect_uri with real data.

httpcaller2019.fmwt

Badge +15

Can not check exactly because we don't have the username, password and redirect_uri, but it should work with something like this. I think it will work when you replace username, password and redirect_uri with real data.

httpcaller2019.fmwt

I expect that "Use Authentication" must be off. The website expects the Username and Password as Multipart / Form Data (Based on the fact that it is set with the -d parameter in the CURL.)

 

As body you have to set Upload Data to Multipart / Form Data.

And all the parameters after the -d are Name Value just like Niels set the Query String Parameters. And the Type is set to String Upload.

 

I expect the -H parameter 'Content-Type: application/x-www-form-urlencoded' to be set by FME when you choose the Upload Data to be Form Data. If this is not the case you have to set this manualy within the Headers settings.

Badge

It worked for me. Thank you.

 

Reply