We are trying to make Meraki API call from Cisco 9800 WebUI but seeing a CORS related error. Please find more details about API call and error below. Does Meraki not allow cross origin requests made from browser?
Our objective is to claim an AP on to Meraki dashboard using below template from eWLC WebUI
{
method: 'POST',
url: 'https://api.meraki.com/api/v1/organizations/yyyy/claim',
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"X-Cisco-Meraki-API-Key": "xxxx"
},
data: {
"orders": [],
"serials": [ "AAAA-BBBB-CCCC" ],
"licenses": []
}
};
Using a valid Cisco Meraki API key.
Access to XMLHttpRequest at 'https://api.meraki.com/api/v1/organizations/yyyy/claim' from origin 'zzz' has been blocked by CORS policy: Request to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.