I'm receiving an error when providing an API Key using the JS SDK version 4.27. Same behavior for 4.25. This had previously been working:
loadModules([
'esri/config',
'esri/Map',
'esri/views/MapView',
]).then(([esriConfig, Map, MapView]) => {
esriConfig.apiKey = 'xyz';
const map = new Map({
basemap: 'topo-vector',
});
const view = new MapView({
viewDiv: 'test',
map: map
});
});
Obviously, substituting our actual API key for 'xyz'. This is hitting the following URL:
https://cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json?f=json&token=xyz

Without providing an API key, it works.
This had been working previously, as my developer account has historical usage. I've also tested a different API key and receive the same error. Structurally there's not much else going on in the code, and it's the same approach mentioned by official documentation: https://developers.arcgis.com/javascript/latest/tutorials/display-a-map/
