Search code examples
google-beacon-platform

Beacon Won't Register. "Already Exists"


I am attempting to register an Eddystone beacon via the Proximity Beacon API. I am posting the following data to https://proximitybeacon.googleapis.com/v1beta1/beacons:register:

{
  "advertisedId": {
    "type": "EDDYSTONE",
    "id": "…"
  },
  "status": "ACTIVE",
  "latLng": {
    "latitude": …,
    "longitude": …
  }
}

However, every attempt I make returns back the following response:

{
  "error": {
    "code": 409,
    "message": "Storage failure.",
    "status": "ALREADY_EXISTS"
  }
}

This is the very first beacon I have attempted to register. A GET on https://proximitybeacon.googleapis.com/v1beta1/beacons?q=status:active returns nothing:

{
  "nextPageToken": "…"
}

…which tells me the beacon doesn't actually exist yet. Is there more I'm required to send along with the beacon registration request?


Solution

  • Two possible reasons for this, as far as I can surmise:

    1. Somebody has already registered this beaconID (really, not particularly likely).
    2. You have already registered this beacon with a different project from the Google Developer API Console thingie. A beacon can only be registered once in the Proximity Beacon API.

    If you registered it with another project, and now want to associate it with another project, you'll probably have to use the manufacturer's provisioning app to give it a new BeaconID — then you can easily add it to the PB API database.