498 Invalid Token

1517
3
02-20-2013 10:53 AM
GregWietholter
New Contributor
I'm attempting to utilize the vrp ('Vehicle Routing Problem Service') within the Network Analysis Services. I am successfully able to generate a token. However, when I attempt to call to the vrp service and use that token, I get a '498 - Invalid Token' message.

I'm certain the token was created with proper credentials, and is not expired as it is newly generated.

Therefore, my guess is that the 'referer' property might be the issue. For the token request I issue a referer value (let's say MyRefererValue) in both the generated url and also in the request's 'referer' property. Then in the vrp call I of course use the token and I also set the request's referer property to the same value (let's say MyRefererValue).

Do you feel this is indeed related to the referer or could there be another cause of this 498? Any help or guidance would be greatly appreciated.

-Greg
0 Kudos
3 Replies
RahulMetangale1
Occasional Contributor II
Greg,

Yes, it could be the refer causing invalid token issue. Why don't you use the identity manager if you are using the ArcGIS JavaScript API? Here is the sample link for your reference:
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/widget_identitymanager
0 Kudos
GregWietholter
New Contributor
I need to step back and speak about this at a higher level. 

The other calls work, only the VRP call fails.  So for instance, I can generate a token and use that token to call a single-route optimization.  However, when I try the VRP call, I get the 498 Invalid Token.  So it's not as if I have an invalid token in reality since that same token works for other calls.

I'm not sure of the best forum area in which to seek help.  I tried the 'ArcGIS Online' forum and they told me to seek a developer forum, which is why I'm here.  But really it's an authentication issue, not so much language specific probably.  Is this the correct place for me to have posted or is there a better place to re-post again?
0 Kudos
GregWietholter
New Contributor
My Esri contact solved this mystery.  So the online documentation's example used 'logisticsdev.arcgis.com' (an internal server) whereas it should have read 'logistics.arcgis.com' (sans 'dev').  They assured me that they'd edit the documentation but this was the source of the issue.
0 Kudos