Got token for private web map, but still coming back with 'you do not have permission'

1330
0
07-26-2016 03:33 PM
MichaelBell8
New Contributor


I'm trying to open a private web map with the correct account details, but it's not working. I'm generating a token using the following JSON:

string Data = "f=json&request=gettoken&username=<<MY_USER_NAME>>&password=<<MY_PASSWORD>>&referer=http://localhost:12345/WebForm.aspx";

(where 12345 is a made-up number)

It does return a token, which I then feed into an iFrame using this:

this.MapFrame.Attributes["src"] = "//MyMaps.maps.arcgis.com/apps/Embed/index.html?webmap=LONG_WEBMAP_ID&amp;extent=1,-1,1,-1&amp;zoom=true&amp;scale=true&amp;search=true&amp;searchextent=true&amp;legend=true&amp;basemap_gallery=true&amp;disable_scroll=true&amp;theme=light&amp;token=" + Our_Token;

(Our_Token is a parsed-down version of what is returned, and is basically the token only. I've checked this and it's correct)

But every time I try it, I get the following errors in Chrome's Developer Console:

init.js:89 Error: You do not have permissions to access this resource or perform this operation.

Refused to display 'blahblahblahlonglink' in a frame because it set 'X-Frame-Options' to 'DENY'.

0 Kudos
0 Replies