Accessing admin API using ArcGIS developer account

696
2
03-25-2020 07:22 AM
GurpreetPuri
New Contributor

I have a created an ArcGIS Developer account and trying to test  addToDefinition operation 

 https://services.myserver.com/OrgID/ArcGIS/rest/admin/services/example/FeatureServer/0/addToDefiniti...

but  getting below error:

{
"error" :
{
"code" : 403,
"message" : "User does not have permissions to access this service",
"details" : [
"User does not have permissions to access this service"
]
}

I am not sure How to access admin api using Arcgis developer account?

0 Kudos
2 Replies
jeroen_v
New Contributor

I have the same problem

Why is nobody answering this question?

This item is posted 10 months ago. 

 

0 Kudos
City_ofNorth_Bay
New Contributor III

I had this problem too and wanted to use Update Definition or Add To Definition. What worked for me was right under my nose. I was getting the token from different sources and it would accept the token but then it would continue to say "User does not have permissions to access this service."

In AGOL Online, within the Hosted Feature Layer's Overview, I clicked on my actual Polygon Layer. This brings you to the layer itself. Then instead of Copying the URL, click the View link. It brings over the proper token! (Not sure if this is new since the last few updates to AGOL)

Then add "admin" to the URL and bingo! ( change "rest/services/" to "rest/admin/services/")

Hope this helps you  "View" the proper token and access your services.