Skip to main content
When you use List Connected Accounts, you can filter the list by one or more custom metadata pairs. Include the custom_metadata_has parameter with a JSON string that specifies the desired key:value pairs.
If the Connect Webview associated with a connected account contains custom metadata, Seam transfers this custom metadata to the connected account. However, you can also use the Update Connected Account method with the optional custom_metadata property to change or add custom metadata for a connected account.
Request:
const connected_accounts = await seam.connectedAccounts.list({
  custom_metadata_has: {
    internal_account_id: 'user-1',
  },
})

console.log(connected_accounts)
Response:
[
  {
    connected_account_id: 'c993818b-bf3c-4836-bef4-9a76d89bf1d3',
    created_at: '2024-01-05T07:20:07.692Z',
    user_identifier: { username: 'jane' },
    account_type: 'visionline',
    account_type_display_name: 'Visionline',
    errors: [],
    warnings: [],
    custom_metadata: { internal_account_id: 'user-1' },
    automatically_manage_new_devices: true
  },
  ...
]