// Get the access system.
const buildingA = await seam.acs.systems.get({
acs_system_id: '11111111-1111-1111-1111-111111111111',
})
// Step 1:
// Create a user identity that corresponds to your user's app account.
const janeUser = await seam.userIdentities.create({
full_name: 'Jane Doe',
})
// Step 2:
// Create an access system user on the Salto Space access system.
const accessSystemUser = await seam.acs.users.create({
user_identity_id: janeUser.user_identity_id,
acs_system_id: buildingA.acs_system_id,
full_name: janeUser.full_name,
phone_number: '+15555550100',
})
// Step 3:
// Add the access system user to all desired access groups.
const accessGroupIds = [
'44444444-4444-4444-4444-333333333333',
'44444444-4444-4444-4444-444444444444',
]
for (const accessGroupId of accessGroupIds) {
await seam.acs.users.addToAccessGroup({
acs_user_id: accessSystemUser.acs_user_id,
acs_access_group_id: accessGroupId,
})
}
// Step 4:
// Create a mobile key for the access system user.
const mobileKey = await seam.acs.credentials.create({
acs_user_id: accessSystemUser.acs_user_id,
access_method: 'mobile_key',
is_multi_phone_sync_credential: true,
})