EsriEduNL / veldwerk2.0

WebApp to use ArcGIS Online Organization account for student field trips
GNU General Public License v2.0
1 stars 0 forks source link

Token on featureservice #44

Open dhunink opened 9 years ago

dhunink commented 9 years ago

The following function returns Error: token required Why sin't the EsriRequest sending a token when queuing the featureserivce?

fsQueryUrl = vragenLayer.url+"/query";
var fsRequestQuery = esriRequest({
  url: fsQueryUrl,
  content: { f: "json", outFields : "*", where : "GROUPID IS NULL"},
  handleAs: "json"
});

schermafbeelding 2015-03-07 om 15 31 40

dhunink commented 9 years ago

Suggested irl by @mvhulzen: could be the regular design of the API. A insecure request is made while the desired action requires authentication, so a error is thrown. In response a second call is made, this time secured with a token. If the above is true, a fix is not needed but could be accomplished by adding a secure token on the first request and force the API call to include that token.