Select to view content in your preferred language

Generate a Token

11494
2
03-16-2019 09:31 AM
KellyGerrow
Esri Alum
2 2 11.5K

In order to access the history log, an administrator token must be appended to your request. You can obtain a token in a few ways. The following log includes two quick ways to grab this token. 

Note. As these are administrative tokens, please don't share your token in the forums. These can potentially be used in malicious ways if the wrong person obtains your token. 

Option 1: Generate a token using postman

1. Download or open postman  (It's free)

2. Click the +New button to create a new request

3. In the new tab, set the following:

  • Change the HTTP method from GET to POST.
  • Set the URL to https://www.arcgis.com/sharing/generateToken

4. Click on Body and add the following parameters as Key/Value pairs:

  • username: Your administrator username (case sensitive)
  • password: Your password
  • referer https://www.arcgis.com
  •   f : json

5. Click Send and copy the token in the response below for use in requests

Option 2: Use Developer tools

1. Open developer tools in your browser  ( In chrome, Menu>more tools> Developer tools)

2. Sign into arcgis.com with your administrator credentials

3.  In the developer tools click on network and type 'self' into the filter box

4. Click on the first url, click header tab and scroll to Query String Parameters(the very last section).

5. Copy the token value to use in requests

2 Comments
About the Author
I love interactive maps and apps on the internet! The maps and apps that customers create and share on the web, make my job awesome. I'm a Product Manager with the ArcGIS Online team in Redlands, California. I am a proud graduate from Carleton University and the COGS in Canada, with research focus' in Health Geography. Originally from Bedford, NS, Canada but have spent a lot of time in Haliburton and Ottawa, Ontario. I have a passion for the outdoors and dogs.