How to let an App Access a Layer that was created by another User on ArcGIS Online?

629
0
03-08-2018 10:44 PM
DevdattaTengshe2
New Contributor


I'm creating a Custom App developed using ArcGIS JavaScript API. I need to access secured services from ArcGIS Online (hosted Feature service) in this App.

I've managed to do the following:

  • Published a feature Layer from my AGOL (enterprise) Account.
  • Created an App on developers.arcgis.com
  • I'm hosting a custom service which uses the client_id & client_secret to get the token.
  • This Token is used to make a request to FeatureLayer, and data is displayed on the Map.


All of this was successful. Now I want to make a request to a FeatureLayer that was shared with me, by another user in the same Enterprise. I can see this layer in ArcGIS Online, and add it to maps in the Web UI. But when I try to use my Custom App, I get the following error when trying to connect to it via the token:

{"error":{"code":403,"message":"You do not have permissions to access this resource or perform this operation.","messageCode":"GWM_0003","details":["You do not have permissions to access this resource or perform this operation."]}}

How do I let an App Access a Layer that was created by another User on ArcGIS Online?

0 Kudos
0 Replies