Programming Salto KS Mobile Credentials
Learn how to create mobile credentials in the Salto KS ACS.
# Get the ACS system.
building_a = seam.acs.systems.get(
acs_system_id = "11111111-1111-1111-1111-111111111111"
)
# Define the listing.
listing = {
"listing_id": "2222222-2222",
"seam_access_group_ids": [
"555555-5555",
"666666-6666"
]
}
# Define the reservation.
reservation = {
"reservation_id": "3333122-433",
"guest_email": "[email protected]",
"listing_id": "2222222-2222",
"check_in": "2024-11-01T15:00:00.000Z",
"check_out": "2024-11-04T11:00:00.000Z"
}
# Step 1:
# Create a user identity that corresponds to your user's mobile app account.
jane_user = seam.user_identities.create(
email_address = "[email protected]"
)
# Step 2:
# Retrieve a credential manager.
salto_ks_credential_manager = seam.acs.systems.list_compatible_credential_manager_acs_systems(
acs_system_id = building_a.acs_system_id
)[0]
# Step 3:
# Set up an enrollment automation for the user identity, to enable mobile keys.
seam.user_identities.enrollment_automations.launch(
user_identity_id = jane_user.user_identity_id,
create_credential_manager_user = True,
credential_manager_acs_system_id = salto_ks_credential_manager.acs_system_id
)
# Step 4:
# Create an ACS user on the Salto KS ACS.
# Specify the access schedule for the user.
reservation_user = seam.acs.users.create(
user_identity_id = jane_user.user_identity_id,
acs_system_id = building_a.acs_system_id,
full_name = reservation["reservation_id"],
access_schedule = {
"starts_at": reservation["check_in"],
"ends_at": reservation["check_out"]
}
)
# Step 5:
# Add the ACS user to all access groups for the listing.
for group_id_to_add in listing["seam_access_group_ids"]:
seam.acs.users.add_to_access_group(
acs_user_id = reservation_user.acs_user_id,
acs_access_group_id = group_id_to_add
)
# Step 6:
# Create a mobile key for the ACS user.
reservation_mobile_key = seam.acs.credentials.create(
acs_user_id = reservation_user.acs_user_id,
is_multi_phone_sync_credential = True,
access_method = "mobile_key"
)
# View the new credential.
pprint(reservation_mobile_key)Next Steps
PreviousProgramming Salto KS PIN Code CredentialsNextSpecial Requirements for Android Mobile Access SDK Development
Last updated
Was this helpful?

