Embedding a Connect Webview in Your App
Use redirection or an iframe to embed a Connect Webview in your app.
Last updated
Was this helpful?
Use redirection or an iframe to embed a Connect Webview in your app.
Last updated
Was this helpful?
To enable your users to connect their devices or access control system to Seam through your app, use a . First, in your app, add a mechanism—such as a button—to . Then, you can use either of the following two methods to in your app:
To enable users to connect their devices or access control system with your app, present a button to create and display a new Connect Webview. If your app has a settings section, we recommend creating a device or ACS settings page and displaying an Add or Link button, such as Add Devices.
To incorporate a Connect Webview in your app using redirection:
Make sure to set a custom_redirect_url
so that the Connect Webview redirects back to the desired page within your app after the Connect Webview flow completes.
If you want to redirect to a different page when there is an error, you can set the custom_redirect_failure_url
to the URL for the desired page.
We recommend setting wait_for_device_creation
to true
so that the Connect Webview does not complete until Seam completes the first sync of the connected account and devices or ACS.
Once the user has completed the authorization flow, the Connect Webview redirects back to your app (specifically to the custom_redirect_url
). Note that Seam appends the following search parameters to the URL after the redirect:
connect_webview_id
If there is an error, error_code
and error_message
For example:
The following example shows how to handle all links to URLs that are not in the getseam.com
or seam.co
domain within a Connect Webview embedded in an iOS or Android app:
For details, see the following relevant iOS or Android documentation:
When your user clicks this button, your app can either or and present it in a modal.
You can or to display the Connect Webview. The following sections describe these two options:
Redirect your app to the URL for the created Connect Webview.
Pass the Connect Webview url
to the client portion of your app and redirect your app to this URL.
The resulting page displays the through which your app user can link their device or ACS account to Seam.
To incorporate a Connect Webview in your app using an HTML :
We recommend setting wait_for_device_creation
to true
so that the Connect Webview does not complete until Seam completes the first sync of the connected account and devices or ACS.
Display the URL for the created Connect Webview in an iframe.
Pass the Connect Webview url
to the client portion of your app and use an HTML to display the Connect Webview URL.
When the connection completes successfully, you can close the iframe.
If you want to include a Connect Webview flow inside an iOS or Android app, it is important to note that iOS and Android require verification for each link to which a user navigates within an app. Consequently, you must register a navigation delegate to handle any links within the Connect Webview. For example, there is a link from the Connect Webview to the . This link includes target=_blank
in the anchor tag to open the privacy policy in a new tab or window. You must configure your iOS or Android app to handle opening links in a new browser tab or window.