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&extent=1,-1,1,-1&zoom=true&scale=true&search=true&searchextent=true&legend=true&basemap_gallery=true&disable_scroll=true&theme=light&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'.