Skip to main content
You can create mobile credentials that enable your mobile app users to unlock entrances in your Salto KS ACS. For more information about Seam mobile keys, see Mobile Access. To use the Seam API to create mobile credentials for mobile app users in a Salto KS ACS:
  1. Create a user identity. Seam user identities enable you to match your own mobile app users to ACS users that you create using the Seam API.
  2. Create an ACS user on the Salto KS ACS or assign an existing ACS user to the user identity.
    The resources that you create for the ACS user are available under the associated user identity.
    • For Salto KS, you can specify the access_schedule for the ACS user. The access_schedule consists of starts_at and ends_at times. In this case, a Salto KS ACS user appears as “unsubscribed” in the ACS until the starts_at time. Once the start time arrives, Seam switches the ACS user to “subscribed,” which activates their access.
  3. Assign the ACS user to one or more access groups.
    • Each access group is preconfigured with the allowed entrances.
  4. Create an ACS credential to represent the mobile key.
The following example walks you through this process:
Code:
// Get the access system.
const buildingA = await seam.acs.systems.get({
  acs_system_id: '11111111-1111-1111-1111-111111111111',
})

// Define the listing.
const listing = {
  listingId: '2222222-2222',
  seamAccessGroupIds: ['555555-5555', '666666-6666'],
}

// Define the reservation.
const reservation = {
  reservationId: '3333122-433',
  guestEmail: 'jane@example.com',
  listingId: '2222222-2222',
  checkIn: '2024-11-01T15:00:00.000Z',
  checkOut: '2024-11-04T11:00:00.000Z',
}

// Step 1:
// Create a user identity that corresponds to your user's app account.
const janeUser = await seam.userIdentities.create({
  email_address: 'jane@example.com',
})

// Step 2:
// Create an access system user on the Salto KS access system.
// Specify the access schedule for the user.
const reservationUser = await seam.acs.users.create({
  user_identity_id: janeUser.user_identity_id,
  full_name: reservation.reservationId,
  acs_system_id: buildingA.acs_system_id,
  access_schedule: {
    starts_at: reservation.checkIn,
    ends_at: reservation.checkOut,
  },
})

// Step 3:
// Add the access system user to all access groups for the listing.
for (const groupIdToAdd of listing.seamAccessGroupIds) {
  await seam.acs.users.addToAccessGroup({
    acs_user_id: reservationUser.acs_user_id,
    acs_access_group_id: groupIdToAdd,
  })
}

// Step 4:
// Create a mobile key for the access system user.
const reservationMobileKey = await seam.acs.credentials.create({
  acs_user_id: reservationUser.acs_user_id,
  access_method: 'mobile_key',
  is_multi_phone_sync_credential: true,
})

// View the new credential.
console.log(reservationMobileKey)
Output:
{
  acs_credential_id: '66666666-6666-6666-6666-666666666666',
  acs_system_id: '11111111-1111-1111-1111-111111111111',
  acs_user_id: '33333333-3333-3333-3333-333333333333',
  access_method: 'mobile_key',
  ...
}

Next Steps

To learn more about using the Seam API with your Salto KS ACS, see the following topics: