Attaching Custom Metadata to the Connect Webview
Use custom metadata to link internal IDs from your application to a Seam Connect Webview and connected account.
Adding Custom Metadata to a Connect Webview enables you to store custom information, like customer details or internal IDs from your application. The custom_metadata
is then transferred to any connected accounts connected via the connect webview, making it easy to find and filter these resources in your Seam workspace.
The custom_metadata
property supports up to 50 JSON key:value pairs. Upon an account is successfully connected via a connect webview, Seam creates a connected account and copies the custom_metadata
to it.
To add custom_metadata
to a Connect Webview:
Execute
/connect_webviews/create
and specify the internal ID as a key:value pair in thecustom_metadata
. For example:
Request:
seam.connect_webviews.create(
provider_category = "stable",
custom_metadata = {
"your_app_user_id": "xxxx" # Insert your custom data here.
}
)
Response:
ConnectWebview(
workspace_id='398d80b7-3f96-47c2-b85a-6f8ba21d07be',
connect_webview_id='49e050d9-cb4c-4600-b24d-cdf9dd2f92b7',
status='pending',
url='https://connect.getseam.com/connect_webviews/view?connect_webview_id=49e050d9-cb4c-4600-b24d-cdf9dd2f92b7&auth_token=C1r8ff3GLSr2L1ifEaCopAgrq2Faht2Dh',
custom_metadata={'id': 'internal_id_1'},
...
)
Your app presents the Connect Webview to your user.
The user completes the Connect Webview.
Seam creates a connected account containing the user's device account information. This connected account includes a
custom_metadata
property that automatically contains the information that you set in thecustom_metadata
property for the Connect Webview.To retrieve the ID of the connected account associated with the completed Connect Webview, get the
connect_webview
and check theconnected_account_id
property.To retrieve the connected account, get the
connected_account
with the ID that you identified in the previous step.Within the returned
connected_account
, view thecustom_metadata
.
Next Steps
Once you have attached custom metadata to Connect Webviews, you can filter your Connect Webviews by this custom metadata.
Last updated
Was this helpful?