How to obtain an API key

 

We’ve now introduced self managed API keys to make it simpler for you to access and integrate your sensor data feeds.

In order to enable an integration between your XY Sense admin account and a 3rd party application, you will need to first obtain your API Key and API Secret.

The API Key can be thought of as a username and the API Secret as a password to your XY Sense API account access. When you give this information to a 3rd party application, they will be able to access your account to sync information or perform other tasks.

 

To obtain your XY Sense API Key and Secret, follow these steps:

 

Note you need to have admin rights to access this feature.

 

Creating a new API key

First head over to the Admin section from the top navigation header.

 

mceclip0.png

 

You will now see a new sub-section called API Keys. This is where you will create new keys or remove access to old ones.

 

mceclip1.png

To create a new API Key, click "Create key".

Enter a description and select the access you would like the key to have.

- ReadPublicApi grants the key read only access to the occupancy data

- WritePublicApi grants the key access to make manual changes to a spaces occupancy. This is only useful for testing purposes and disabled by default. You will need to contact support to enable this.

 

mceclip2.png

 

Hit create. 

An API Secret for Key you just created will now appear in a dialogue box. 

To maintain security of access to your organization's sensor data it is important that your API Secret is only shared with authorized individuals in your organization. 

 

mceclip3.png

 

Done!

Your authorized developers can now copy and paste this API Key alongside the provided API Secret to access the real time occupancy data from installed sensors.

 

mceclip4.png

 

Revoking an API keys access

Simply click the edit (mceclip5.png) icon on the far right of the API key you wish to modify and click "Archive key". 

Note - Once archived, the Key will have its access to sensor data immediately revoked. This means that any integrations or third party tools using the archived Key may now get 'authentication errors'. 

It is best to audit and check which of your API Keys are active in your workplace systems before archiving.

 

mceclip6.png

 

Accessing the API documentation

For further information on how developers can best leverage the XY Sense API, check out our latest API Documentation

As always, please reach out to support@xysense.io if you have any further questions or issues.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.

Have more questions?
Submit a request