2

Following the instructions on this page Working with users, groups, and items—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers and the Add Item documentation I was able build a POST request in POSTMAN to add a new item to the user.

After getting the token, when I try the POST request to add the web map I get this error

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

POSTMAN Request

This is the JSON that contain some simple Web Map data,

{
 "operationalLayers": [],
 "baseMap": {
 "baseMapLayers": [
 {
 "id": "defaultBasemap",
 "layerType": "ArcGISTiledMapServiceLayer",
 "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
 "visibility": true,
 "opacity": 1,
 "title": "Topographic"
 }
 ],
 "title": "Topographic"
 },
 "spatialReference": {
 "wkid": 102100,
 "latestWkid": 3857
 },
 "authoringApp": "WebMapViewer",
 "authoringAppVersion": "5.4",
 "version": "2.11"
}
asked Apr 3, 2018 at 17:39

1 Answer 1

3

I was using the wrong access token.

I was using the access token I had for the app I was testing instead of the user's access token that I had to get with oauth2.

I'm leaving this here for future newbies.

answered Apr 4, 2018 at 9:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.