Mobile Key Quick Start
Create your first mobile key credential to start controlling an access control system with Seam.
In this quick start, create a user identity for a virtual Salto KS access control system. Then, grant the user access to an entrance using a mobile key credential. With mobile keys, developers can create mobile apps that download users' credentials and then use Bluetooth low energy (BLE) or similar communications technologies to unlock granted nearby entrances. For more information about Seam's mobile access solution, see Mobile Access.
Overview
This quick start walks you through the following basic steps:
Connect an access control system to Seam.
To get started quickly, use a virtual ACS in a sandbox workspace.
Install a Seam SDK and create an API key.
Create a user identity.
Seam user identities enable you to match your own mobile app users to ACS users.
Assign the user identity to an access group.
Access groups are preconfigured to grant access to specific entrances. While some access control systems use access groups, others specify allowed entrances directly within the credential. For more details, see Access Permission Assignment Variations.
Create a mobile key ACS credential for the user identity.
View the list of entrances to which the user now has access.
🚀 Let's get started!
Step 1: Connect a Virtual ACS
In this quick start, use Seam Console to connect a virtual ACS to your sandbox workspace. Alternately, you can use the Seam API to create a Connect Webview and then use it to connect an ACS to Seam.
Log in to Seam Console.
In the upper-left corner, click the workspace switcher and select or create a sandbox workspace.
Use the Seam Console workspace switcher to switch between workspaces and create new workspaces. In the top navigation pane, click ACS Systems.
Click ACS Systems to go to the Access Systems page. On the Access Systems page, click New Access System.
Seam Console displays a Connect Webview that enables you to connect a virtual ACS to Seam.
In the Connect Webview, authorize the connection.
Click Continue.
In the device brand list, click Salto KS.
On the Salto KS authorization page:
In the Email field, type
[email protected]
.In the Password field, type
1234
.Click Log In.
When prompted to allow application access, click Yes, Allow.
In the sites list, select Main Site and then click Continue.
Click Close.
The Access Systems page now displays the newly-connected virtual Salto KS access control system.
Step 2: Install a Seam SDK and Create an API Key
Download and install a Seam SDK in your favorite programming language.
npm i seam
Create an API key.
In the top navigation pane of Seam Console, click Developer.
In the left navigation pane, click API Keys.
In the upper-right corner of the API Keys page, click Add API Key.
In the Add API Key dialog, type a name for your new API key and then click Create API Key.
Copy the newly-created API key and store it for future use.
Open a terminal window and export your API key as an environment variable.
export SEAM_API_KEY=seam_test2bMS_94SrGUXuNR2JmJkjtvBQDg5c
The Seam SDK that you have installed automatically uses this API key once you have exported it.
Step 3: Create a User Identity
Create a user identity to represent a mobile app user.
Find the ACS system ID.
In the top navigation pane of Seam Console, click ACS Systems.
On the Access Systems page, locate the Salto KS Main Site ACS.
In the acs_system_id column for the Main Site ACS, click the ID to copy it.
Store this ACS system ID for future use.
Create the user identity, as follows:
Code:
from seam import Seam
seam = Seam() # Seam automatically uses your exported SEAM_API_KEY.
jen_doe_user = seam.user_identities.create(
full_name: "Jen Doe",
email_address = "[email protected]",
# Use the ACS system ID that you copied earlier from Seam Console.
acs_system_ids = [acs_system_id]
)
Output:
UserIdentity(
user_identity_id='22222222-2222-2222-2222-222222222222',
full_name='Jen Doe',
email_address='[email protected]',
...
)
Step 4: Assign the User Identity to an Access Group
Add the user identity to an access group. For Salto KS, access groups specify the entrances to which users have access.
Some other access control systems do not use access groups and, instead, specify allowed entrances directly within the credential. For more details, see Access Permission Assignment Variations.
Find the access group ID.
In the top navigation pane of Seam Console, click ACS Systems.
On the Access Systems page, click the Salto KS Main Site ACS.
On the Main Site page, click the Access Groups tab.
Locate the Main Group, click ..., and click Copy Id.
Store this access group ID for future use.
Assign the user identity to the Main Group, as follows:
Code:
seam.acs.access_groups.add_user(
# Use the access group ID that you copied earlier from Seam Console.
acs_access_group_id = access_group_id,
user_identity_id = jen_doe_user.user_identity_id
)
Output:
None
Step 5: Create a Mobile Key Credential
Create a mobile key credential for the user identity.
Code:
mobile_key = seam.acs.credentials.create(
user_identity_id = jen_doe_user.user_identity_id,
is_multi_phone_sync_credential = True,
access_method = "mobile_key"
)
Output:
AcsCredential(
acs_credential_id='66666666-6666-6666-6666-666666666666',
acs_system_id='11111111-1111-1111-1111-111111111111',
user_identity_id='22222222-2222-2222-2222-222222222222',
access_method='mobile_key',
...
)
Step 6: View Your New Credential
You can use Seam Console, the Seam API, or the Seam CLI to view the list of entrances to which the ACS user now has access.
To use Seam Console to view information about your new PIN code credential:
In the top navigation pane of Seam Console, click ACS Systems.
On the Access Systems page, click the Salto KS Main Site ACS.
In the Users table, click Jen Doe, the ACS user that you created.
Click the ACS user to view their credentials. In the Credentials tab for the ACS user, note the mobile key credential (multi-phone sync credential) that you created.
Click the Access Groups tab for the ACS user.
Click the Main Group access group.
On the Main Group page click the Entrances tab and then view the entrances to which this access group grants the ACS user access.
View the entrances to which the ACS user has access as a member of the access group.
Next Steps
Now that you've created a mobile key credential, try out the other ACS quick starts.
Then, connect your ACS to Seam.
Learn More
For a deeper dive into ACS concepts and instructions, see the following topics:
Learn about ACS concepts.
Create user identities.
For relevant access control systems, assign user identities to access groups.
Learn about available entrances.
Create credentials for ACS users.
Learn more about the Seam mobile access solution.
See the Seam Access Control Systems API reference.
Last updated
Was this helpful?