Use Connect Webviews to connect your users' devices or access control system to Seam. Your users authorize your app to control these devices or ACS with the Seam API.
Seam Connect Webviews are fully-embedded, customizable client-side components that you add to your app if you want to enable your users to import their own devices or ACS using your app. The Connect Webview flow walks your users through the process of authorizing your app to control their devices or ACS with the Seam API. Using this flow, your app users log in to their device or ACS accounts.
Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or ACS using the Seam API. Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox.
Connect Webview Process
This section describes the basic Connect Webview process.
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.
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.
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.
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.