Hi,
We are trying to access some private layers stored in our ArcGIS enterprise hosting. The examples provided don’t seem to work, so we implemented our own method to generate and retrieve the token using OAuth 2.0. However even with the token I cannot access the private layers.
I tried to set the token parameter in this way (see https://developers.arcgis.com/documentation/mapping-apis-and-services/security/):
var layer_1 = new Esri.GameEngine.Layers.ArcGISImageLayer("https://<LOCATION_SERVICE_URL>?token=<ACCESS_TOKEN>", “UN_Map_Imagery", 1.0f, true, "");
arcGISMap.Layers.Add(layer_1);
Or putting the token as API key like that:
var layer_1 = new Esri.GameEngine.Layers.ArcGISImageLayer("<my rest service>", “UN_Map_Imagery", 1.0f, true, "<access_token>");
arcGISMap.Layers.Add(layer_1);
But none of these methods work. From the log, when I am trying to access the layer I am always getting: Error (Propagated error.)
Any suggestions?
Many thanks,
Ferdinando