Skip to main content
Solved

how to call curl command in HTTPCaller

  • June 28, 2019
  • 3 replies
  • 605 views

nag
Contributor
Forum|alt.badge.img
  • Contributor
  • 41 replies

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..

 

Best answer by nielsgerrits

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • Best Answer
  • June 28, 2019

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


jkr_wrk
Influencer
Forum|alt.badge.img+35
  • 424 replies
  • June 28, 2019

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.


nag
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 41 replies
  • June 28, 2019

It worked for me. Thank you.