Programming Salto KS PIN Code Credentials
Learn how to create Salto KS PIN codes.
To use the Seam API to program codes for users in a Salto KS ACS:
Create an ACS user.
For Salto KS, you can specify the
access_schedulefor the new ACS user. Anaccess_scheduleconsists ofstarts_atandends_attimes. In this case, a Salto KS ACS user appears as "unsubscribed" in the ACS until thestarts_attime. Once the start time arrives, Seam switches the ACS user to "subscribed," which activates their access.
Assign access permissions to the ACS user by assigning them to one or more access groups.
Each access group is preconfigured with specific entrances and schedules.
Create an ACS credential.
Specify the ID of the ACS user.
Set the
access_methodtocode.
Creating a new
acs_credentialobject triggers the Salto KS ACS to generate a PIN code for the user.
The following example walks you through this process:
Code:
# Get the ACS system.
building_a = seam.acs.systems.get(
acs_system_id="11111111-1111-1111-1111-111111111111"
)
# Step 1:
# Create the new ACS user, including the
# desired access schedule.
acs_user = seam.acs.users.create(
full_name = "Jane Doe",
acs_system_id = building_a.acs_system_id,
access_schedule = {
"starts_at": "2024-11-01T15:00:00.000Z",
"ends_at": "2024-11-04T11:00:00.000Z"
}
)
# Step 2:
# Add the ACS user to all desired access groups.
access_group_ids = [
"44444444-4444-4444-4444-333333333333",
"44444444-4444-4444-4444-444444444444"
]
for access_group_id in access_group_ids:
seam.acs.users.add_to_access_group(
acs_user_id = acs_user.acs_user_id,
acs_access_group_id = access_group_id
)
# Step 3:
# Create a PIN code for the ACS user.
pin_code = seam.acs.credentials.create(
acs_user_id = acs_user.acs_user_id,
access_method = "code"
)
# View the new credential.
pprint(pin_code)Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Next Steps
To learn more about using the Seam API with your Salto KS ACS, see the following topics:
Access Control Systems in the Seam API reference
User Identities in the Seam API reference
Last updated
Was this helpful?

