Create your first PIN code credential to start controlling an access control system with Seam.
In this quick start, create an ACS user for a virtual Salto KS access control system. Then, grant the user access to an entrance using a PIN code credential.
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.
View the following information about your successfully-created credential:
The PIN code for the credential.
The access schedule for the ACS user.
The list of entrances to which the ACS user now has access.
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.
import { Seam } from "seam";
const seam = new Seam(); // Seam automatically uses your exported SEAM_API_KEY.
const acsUser = await seam.acs.users.create({
full_name: "June Doe",
// Use the ACS system ID that you copied earlier from Seam Console.
acs_system_id: acsSystemId,
access_schedule: {
"starts_at": "2025-02-10T15:00:00.000Z",
"ends_at": "2025-02-12T11:00:00.000Z"
}
});
<?php
require 'vendor/autoload.php';
$seam = new Seam\SeamClient(); // Seam automatically uses your exported SEAM_API_KEY.
$acs_user = $seam->acs->users->create(
full_name: "June Doe",
// Use the ACS system ID that you copied earlier from Seam Console.
acs_system_id: $acs_system_id,
access_schedule: array(
"starts_at" => "2025-02-10T15:00:00.000Z",
"ends_at" => "2025-02-12T11:00:00.000Z"
)
);
Add the ACS user 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 ACS user to the Main Group, as follows:
Code:
seam.acs.users.add_to_access_group(
acs_user_id = acs_user.acs_user_id,
# Use the access group ID that you copied earlier from Seam Console.
acs_access_group_id = access_group_id
)
Output:
None
Code:
# Use the access group ID that you copied earlier from Seam Console.
curl -X 'POST' \
'https://connect.getseam.com/acs/users/add_to_access_group' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"acs_user_id\": \"$(jq -r '.acs_user.acs_user_id' <<< ${acs_user})\",
\"acs_access_group_id\": \"${access_group_id}\"
}"
Output:
{
"ok": true
}
Code:
await seam.acs.users.addToAccessGroup({
acs_user_id: acsUser.acs_user_id,
// Use the access group ID that you copied earlier from Seam Console.
acs_access_group_id: accessGroupId
});
Output:
void
Code:
seam.acs.users.add_to_access_group(
acs_user_id: acs_user.acs_user_id,
# Use the access group ID that you copied earlier from Seam Console.
acs_access_group_id: access_group_id
)
Output:
nil
Code:
$seam->acs->users->add_to_access_group(
acs_user_id: $acs_user->acs_user_id,
// Use the access group ID that you copied earlier from Seam Console.
acs_access_group_id: $access_group_id
);
Output:
void
Code:
// Coming soon!
Output:
// Coming soon!
Code:
// Coming soon!
Output:
// Coming soon!
Code:
_, err := client.Acs.Users.AddToAccessGroup(
context.Background(), &acs.UsersAddToAccessGroupRequest{
AcsUserId: acsUser.AcsUserId,
// Use the access group ID that you copied earlier from Seam Console.
AcsAccessGroupId: accessGroupId,
},
)
Output:
void
Step 5: Create a PIN Code Credential
Create a PIN code credential for the ACS user. After you create the credential, Salto KS generates the corresponding PIN code.
You can use Seam Console, the Seam API, or the Seam CLI to view the following information about your successfully-created credential:
The PIN code for the credential.
The access schedule for the ACS user.
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 June Doe, the ACS user that you created.
In the Credentials tab for the ACS user, view the Code for the PIN code credential that you created.
In the Properties area for the ACS user, view the user's access schedule.
Note that Seam Console displays times adjusted to your local computer settings. That is, the times that you see in Seam Console are the times that you specified when creating the credential, adjusted to match your computer's time settings.
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.
Next Steps
Now that you've created a PIN code credential, try out the other ACS quick starts.