Can I get the token from an AGOL hosted app to pass in a URL parameter?

573
0
01-24-2017 12:50 PM
ChrisMathers1
Occasional Contributor II

I have a simple app I have put together for a department to use in the field. They want to be able to identify on a point and get a report they can print sometimes of the attributes. I put together a nice little bootstrap page with an inset ArcGIS JS map but I need to authenticate the page to make a query against our REST endpoint. This page would be hosted on a local webserver and be querying a local ArcGIS Server. My idea was to have a link in the popup which passes the OID of the feature as a URL parameter. That goes into a request URL to the service and the JSON response is parsed out. That part is easy. I cant figure out how to authenticate it though. It could ask for a password at each page load but I would rather not since that would be irritating if they needed to print several in a row. Alternative solutions gladly welcome.

0 Kudos
0 Replies