Develop own beacons manager


I want to develop a beacons web manager for my own beacons. I found the Cloud API here,

I tried with AJAX, but got the error :

XMLHttpRequest cannot load Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://***’ is therefore not allowed access.

This is the function I used:

function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var beacons = JSON.parse(this.responseText);
var txt = “”;
var x;
for (x=0; x < beacons.length; x++) {
console.log(beacons[x] + “_” + beacons[x];

var myUrl=“”;“GET”, myUrl, true);
xhttp.setRequestHeader(“Access-Control-Allow-Origin”, “*”);
xhttp.setRequestHeader(“Authorization”, “Basic” + btoa(“AppID:AppToken”));
// xhttp.setRequestHeader(“Accept”, “application/json”);
xhttp.setRequestHeader(“Accept”,“application/json; charset=utf-8”);

Does anyone have any idea on this? Thank you

You should try it from the server side. It is not just enough with setting a header for Access-Control-Allow-Origin, their servers has to allow your domain. This usually happens when using headers other than basic headers.
Take a look at
for further reading see and

There are plenty of managers for your beacons out there. beejuy dot com let’s you manage beacons and their content. beaconcontrol dot io/ is an open source software that allows you to do the same. pushmote, and other are good paid options with integrations to estimote and kontakt. I would recommend trying one of them first unless you are learning or trying to enter the beacon management market

Thank you jdelgado2002. Really helpful information.