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

8 replies

david_r
Celebrity

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
Supporter
Forum|alt.badge.img+19
  • Supporter
  • March 25, 2017

@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

 


itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • 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

 


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
Supporter
Forum|alt.badge.img+19
  • Supporter
  • 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

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
Celebrity

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.