Kontakt IO Beacon - Usage of API Key

462 views Asked by At

I have downloaded demo from GitHub

https://github.com/kontaktio/kontakt-beacon-admin-sample-app

Here they have used Server API Key to initialize.

public class App extends Application {

  private static final String API_KEY = "Your Api Key here";

  @Override
  public void onCreate() {
    super.onCreate();
    initializeDependencies();
  }

  //Initializing Kontakt SDK. Insert your API key to allow all samples to work correctly
  private void initializeDependencies() {
    KontaktSDK.initialize(API_KEY);
  }

}

My question is ,

it is suppose to scan and give only those beacon which are registered to my portal of which Server API key I have placed in above code ?

Currently, I am running the demo with 2 different API key and both the time I am getting 2 of my beacons which are registered with only single API key, my thinking is that second key should not give any beacon in result of scan.

Please clear my doubts. How to use API key to only get those beacons which are registered for that key only?

1

There are 1 answers

0
mrtnclzd On

The API key is meant to authenticate any communication with Kontakt.io's RESTful API; scanning is happening locally using the BLE interface, that's why you can see both devices.

Try configuration instead, which should fetch appropriate credentials only when authenticating with the correct API key.