Acquiring ArcGIS tokens

Discussion created by jpacosta on May 14, 2013
I have been spending too much time trying to create a token for my services with no success. Im hoping I can get the help I need from this forum since the ESRI Analyst that has helped me seemed just as confused.

Here's my scenario:
    I have ArcGIS server 10.1 SP 1 running on Amazon EC2 within a VPC(virtual private cloud).
    I have a customized version of the arcgis online simple map viewer (JSAPI)
    The IP address is this is what I use to RDP to the instance (JSAPI)
    Both gismaps and are pointers to
    I tried using both the arcgis account and the AGS admin account for the token and had no luck

     webmap.itemData = {
          "operationalLayers": [
      "url": "",
      "id": "trafficStatusMobile_5116",
      "visibility": true,
      "opacity": 1,
      "title": "Carlsbad Boundary"
    "url": "",
    //"id": "trafficStatusMobile_6847",
    "visibility": true,
    "opacity": 1,
    "mode": 1,
    "title": "Road Maintenance",

I need a 1 year token
    Do I create the token from my desktop or from the Amazon instance?
    Do I use HTTP Referer? IP Address? or IP address of this request's origin? If I use http Referer, what's the syntax for http referer:?