Hello, I have created a few things setup in the ArcGis Online, like a Webmap, Feature Layers on that, and an API key to access it.. Within my organization I have shared the webmap and feature layers to my organization. I then went into create item, API Key - selected 'view' content in general to give permission to view shared info in my organization, and then I even went in and selected items (My basemap and feature layer) that I wanted it to have access to...
I am just trying to test an index.html file with a script tag and hit my webmapID with my esriconfig api key and I keep getting 'invalid token' issues.. I have tried a dozen combinations at this point of regenerating the key, changing its access and permissions, secondary key, creating a new one etc.. though I cannot fix this issue. I even tested it against some public urls like:
'https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=json&SingleLine=1600+Pennsylvania+Ave+NW+DC&token=' and appending my token to see, but I swear I had a working token a few days ago for a different test application and even tried testing that against my app and this public one but still keep getting that error..
Here is what my browser console is saying
------------------------------------------------------------------------------------------------------------------------------------
[@arcgis/core/WebMap] #load() Failed to load web map
- o {type: 'error', name: 'webmap:load-portal-item', message: 'Failed to load portal item', details: {…}}
- details:
- error: o
- details: {url: 'https://www.arcgis.com/sharing/rest/portals/self', requestOptions: {…}, ssl: false, getAllHeaders: ƒ, getHeader: ƒ, …}
- message: "Invalid token."
- name: "request:server"
- type: "error"
- [[Prototype]]: Object
- [[Prototype]]: Object
- message: "Failed to load portal item"
- name: "webmap:load-portal-item"
type: "error"
Am I going crazy or is Esri API Token validating service/package down or messing up? Any help would be much appreciated, thanks.