Learn how to create, display, and complete Connect Webviews to connect devices and systems to Seam.
This topic describes the basic Connect Webview process. First, you create the Connect Webview and display it for your user from within your app. Your user completes the Connect Webview flow to authorize the device or system account connection to Seam. Then, you can verify the successful account connection, retrieve the newly-connected devices or systems, and start controlling these devices or systems with Seam.
Step 1: Create a Connect Webview
The Connect Webview flow begins when your user wants to connect their device or ACS account to Seam through your app.
In your app, create a Connect Webview. The Seam API represents Connect Webviews as connect_webview objects.
The created connect_webview object includes a url property.
The Connect Webview guides your app user through the following authorization steps:
In the introduction page of the Connect Webview, the user clicks Continue.
The user selects their device or ACS brand.
The user follows the displayed instructions to authorize their account.
Seam handles all the necessary authorization steps.
For most brands, this authorization flow consists of a simple device account login. Some brands also require multifactor authentication or other information.
For example, brands like Yale offer multiple backend services, depending on the user's global region. Seam prompts the user to identify the correct service and then proceeds with the appropriate authorization request.
The Connect Webview displays a page to indicate the successful device or ACS account connection.
If an error occurs, the Connect Webview displays the error type, for example, an incorrect password.
For more complicated errors, the Connect Webview displays a simple Contact support link that raises the issue to our support team.
Step 4: Verify Successful Account Connection
Use one of the following methods to learn when the account connection has completed successfully:
You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews.
Step 5: Retrieve Connected Devices or ACS
Use the connected_account_id from the connected_account.connected event or the completed Connect Webview to retrieve the devices or ACS that your user has just connected to Seam.
Once you have retrieved the newly-connected set of devices or ACS, you can start controlling them with the Seam API. For example, for a set of devices, you may first want to prompt your user to group devices by property. For an ACS, you may first want your user to configure the access permissions to grant to new visitors or tenants.
If your user wants to connect additional devices or ACS from different brands to Seam, your app must create and present a new Connect Webview for each different account that your user wants to connect.
Step 6: Use the Seam API to Control Your Users' Connected Devices or ACS
Continue using the Seam API to control your users' connected devices or ACS. For example, if you app user has connected a lock that support remote unlock operations, your app can now unlock the lock.
To learn about the actions that you can perform using the Seam API, see the Seam capability guides. These guides provide helpful tutorials and code samples, categorized by capability types.