Skip to main content
Solved

I am trying to use HTTPCaller to generate a token which can be used in a REST API Service.


Forum|alt.badge.img

I am trying to use HTTPCaller to generate a token which can be used in a REST API Service. The token can be generated manually from the web site: https://gisservices.information.qld.gov.au/ArcGIS/tokens/generateToken. I am putting the parameters for this into the 'Query String Parameters box'. I just need an example of how this is done using the HTTPCaller? I keep getting 'HTTP Method Not Allowed'

Best answer by johnm

Hi @itay, Thankyou very much for this. That worked perfectly on the desktop. I will apply this to FME Server as well. Just a quick question, can you explain the 'Content Type:

application/x-www-form-urlencoded and how it is derived? Thanks again, John

View original
Did this help you find an answer to your question?

8 replies

david_r
Evangelist
  • March 24, 2017

Seems you have to use POST over an https connection, unless they have specifically activated GET. Documentation: http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000ts000000


Forum|alt.badge.img
  • Author
  • March 25, 2017

Thanks David, I have changed to a POST but I am still not getting a token back: {"error":{"code":201,"message":"Exception in generating token","details":"Invalid request <br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens?request=gettoken&username;=username&password;=password&<br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens/generateToken?username=username&password;=password

I am just not sure what values should be in the HTTPCaller httpcaller.pdf

 

 


Forum|alt.badge.img
  • Author
  • March 25, 2017

@itay Hi , Can you please provide your example Workspace again:

downloadws2015v2.fmw

I can't seem to retrieve it?

itay
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 25, 2017
Hi @johnm, I am adding a template I use for requesting a token from FME SERVER, hopefully it can be of help to you how to configure the request.

 

Made with FME 2017

 

requesttoken.fmw

 


itay
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 25, 2017
johnm wrote:

@itay Hi , Can you please provide your example Workspace again:

downloadws2015v2.fmw

I can't seem to retrieve it?
Hi @johnm, I am adding a template I use for requesting a token from FME SERVER, hopefully it can be of help to you how to configure the request.

 

Made with FME 2017

 

requesttoken.fmw

 


Forum|alt.badge.img
  • Author
  • Best Answer
  • March 26, 2017

Hi @itay, Thankyou very much for this. That worked perfectly on the desktop. I will apply this to FME Server as well. Just a quick question, can you explain the 'Content Type:

application/x-www-form-urlencoded and how it is derived? Thanks again, John


itay
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 26, 2017
johnm wrote:

Hi @itay, Thankyou very much for this. That worked perfectly on the desktop. I will apply this to FME Server as well. Just a quick question, can you explain the 'Content Type:

application/x-www-form-urlencoded and how it is derived? Thanks again, John

See more about content types here:

 

http://playground.fmeserver.com/using-the-rest-api/basics/

 

I have converted my previous comment to an answer.

 

 


david_r
Evangelist
  • March 27, 2017
johnm wrote:

Thanks David, I have changed to a POST but I am still not getting a token back: {"error":{"code":201,"message":"Exception in generating token","details":"Invalid request <br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens?request=gettoken&username;=username&password;=password&<br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens/generateToken?username=username&password;=password

I am just not sure what values should be in the HTTPCaller httpcaller.pdf

 

 

You probably have to transmit the parameters in the message body and not in the URL.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings