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.
This quick start walks you through the process that applies specifically to the Salto KS ACS. There are often differences between access control systems. Once you've completed this quick start, learn how to work with your ACS using Seam, by reading the system integration guide for your ACS.
Overview
This quick start walks you through the following basic steps:
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.
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 = "jen.doe@example.com",
# Use the ACS system ID that you copied earlier from Seam Console.
acs_system_ids = [acs_system_id]
)
import { Seam } from "seam";
const seam = new Seam(); // Seam automatically uses your exported SEAM_API_KEY.
const jenDoeUser = await seam.userIdentities.create({
full_name: "Jen Doe",
email_address: "jen.doe@example.com",
// Use the ACS system ID that you copied earlier from Seam Console.
acs_system_id: acsSystemId,
});
require "seam"
seam = Seam.new() # Seam automatically uses your exported SEAM_API_KEY.
jen_doe_user = seam.user_identities.create(
full_name: "Jen Doe",
email_address: "jen.doe@example.com",
# Use the ACS system ID that you copied earlier from Seam Console.
acs_system_id: acs_system_id,
)
<?php
require 'vendor/autoload.php';
$seam = new Seam\SeamClient(); // Seam automatically uses your exported SEAM_API_KEY.
$jen_doe_user = $seam->user_identities->create(
full_name: "Jen Doe",
email_address: "jen.doe@example.com",
// Use the ACS system ID that you copied earlier from Seam Console.
acs_system_id: $acs_system_id,
);
To create mobile keys for mobile app users, you must use a credential manager. When you added the virtual Salto KS ACS to your sandbox workspace earlier in this quick start, Seam automatically added a compatible virtual credential manager. Identify the ID of this credential manager.
In the top navigation pane of Seam Console, click ACS Systems.
On the Access Systems page, locate the Salto KS Credential Manager.
In the acs_system_id column for the Salto KS Credential Manager, click the ID to copy it.
Store this credential manager ID for future use.
Step 5: Set up an Enrollment Automation for the User Identity
Once you've identified the the credential manager to use for mobile app users, launch an enrollment automation to initialize the phones for an app user, that is, a user identity. This enrollment automation oversees the registration of each new phone for the user identity with the credential manager.
Code:
seam.user_identities.enrollment_automations.launch(
user_identity_id = jen_doe_user.user_identity_id,
create_credential_manager_user = True,
# Use the credential manager ID that you copied earlier from Seam Console.
credential_manager_acs_system_id = credential_manager_acs_system_id
)
await seam.userIdentities.enrollmentAutomations.launch({
user_identity_id: jenDoeUser.user_identity_id,
create_credential_manager_user: true,
// Use the credential manager ID that you copied earlier from Seam Console.
credential_manager_acs_system_id: credentialManagerAcsSystemId
});
seam.user_identities.enrollment_automations.launch(
user_identity_id: jen_doe_user.user_identity_id,
create_credential_manager_user: true,
# Use the credential manager ID that you copied earlier from Seam Console.
credential_manager_acs_system_id: credential_manager_acs_system_id
)
$seam->user_identities->enrollment_automations->launch(
user_identity_id: $jen_doe_user->user_identity_id,
create_credential_manager_user: true,
// Use the credential manager ID that you copied earlier from Seam Console.
credential_manager_acs_system_id: $credential_manager_acs_system_id
);
client.UserIdentities.EnrollmentAutomations.Launch(
context.Background(), &useridentities.EnrollmentAutomationsLaunchRequest{
UserIdentityId: jenDoeUser.UserIdentityId,
CreateCredentialManagerUser: api.Bool(true),
// Use the credential manager ID that you copied earlier from Seam Console.
CredentialManagerAcsSystemId: credentialManagerAcsSystemId,
},
)
return nil
Step 6: 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
Code:
# Use the access group ID that you copied earlier from Seam Console.
curl -X 'POST' \
'https://connect.getseam.com/acs/access_groups/add_user' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"acs_access_group_id\": \"${access_group_id}\",
\"user_identity_id\": \"$(jq -r '.user_identity.user_identity_id' <<< ${jen_doe_user})\"
}"
Output:
{
"ok": true
}
Code:
await seam.acs.accessGroups.addUser({
// Use the access group ID that you copied earlier from Seam Console.
acs_access_group_id: accessGroupId,
user_identity_id: jenDoeUser.user_identity_id
});
Output:
void
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:
nil
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:
void
Code:
// Coming soon!
Output:
// Coming soon!
Code:
// Coming soon!
Output:
// Coming soon!
Code:
_, err := client.Acs.AccessGroups.AddUser(
context.Background(), &acs.AccessGroupsAddUserRequest{
// Use the access group ID that you copied earlier from Seam Console.
AcsAccessGroupId: accessGroupId,
UserIdentityId: jenDoeUser.UserIdentityId,
},
)
if err != nil {
return err
}
Output:
void
Step 7: Create a Mobile Key Credential
Create a mobile key credential for the user identity.
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.
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.
This quick start shows the server-side portion of the mobile access development process. The other piece of this process is to develop a mobile app that downloads the user's mobile keys and then uses BLE or similar technology to unlock nearby entrances to which the user's credentials grant access. For details, see Integrating into your mobile application.
Next Steps
Now that you've created a mobile key credential, try out the other ACS quick starts.