I have a created an ArcGIS Developer account and trying to test addToDefinition operation
but getting below 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?
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.