Today, we released a feature that would make integrating your code with the MODE cloud even more flexible. Now you can provision API keys to access devices, users and homes in your MODE project without having to create a Smart Module. In fact, API keys previously assigned to Smart Modules have been migrated to this new pool of project-based API keys that you can manage independently. To access these API keys, simply go to the Settings screen of your project on the MODE Developer Console. You will find all your API keys under the API Keys section:

To view the details of an API key, including the actual API key token, simply select one of the entries:

Compared to the API keys issued to devices or users, these keys are for programs or services that want to interact with the MODE cloud. Using these keys, your program will have read access to all the entities in your MODE project. By default, a newly created API key also has the ability to send commands to devices and send events to homes, but you can customize its permissions (and other attributes) by clicking on the edit icon on the API Key Details section.

What Happens to the Smart Module API Keys?

API keys previously assigned to your Smart Modules will continue to work. The only difference is that now you access them via the Settings screen of your project, rather than via the Details screen of each individual Smart Module. New Smart Modules created from now on will not be automatically assigned API keys. If your Smart Module needs to access the MODE API, simply provision a new key from Project Settings.

What Happens to the Admin API Key?

For projects that depend on external user account systems (a.k.a. BYOU projects), you need API keys that you can use to create users or initiate user sessions. Previously, such projects were assigned Admin API Keys. These keys have also been migrated to the list of project-based API keys. They are identical to other API keys, except they are granted the Can Handle BYOU permission.

From now on, after you have created a new BYOU project, you must also provision an API key from Project Settings and enable the “Handle BYOU” permission for it, so that you can use the key to perform the necessary API calls related to BYOU.

Sending Events to Homes

To coincide with the addition of the project API keys, we are also updating the MODE API to simplify the way events are sent to a home. A new API endpoint has been added for any clients using API keys with the proper permission to send events. If your project operate Smart Modules that send events to homes, the API endpoint you were using previously has been retired. Please migrate to the new API endpoint.