- User identity: The user to whom you want to grant access.
- Devices: The set of devices to which you want to grant the user access.
- Access schedule: The starting and ending times for access.
- Access methods: The modes of access, such as PIN codes and mobile keys.
Access Grant Creation Process
To create an Access Grant:- Identify the devices to which you want to grant the user access.
- Create a user identity for the user to whom you want to grant access. Alternately, you can create a new user identity as part of the Access Grant creation action.
-
Create an Access Grant for the user identity to define the devices to which the user should have access, the starting and ending times for this access, and the requested access methods, such as
code. The action returns the created Access Grant. -
Retrieve the resulting access methods once they are issued. For a
codeaccess method, the returned access method includes the PIN code that you can deliver to your user.
Before You Begin
To create an Access Grant for a device, first connect the device account to Seam. Then, confirm that the device supports access codes by checking itscan_program_online_access_codes capability flag.
You can try this entire flow in a sandbox
workspace using sandbox
devices, such as the August sandbox locks.
Identify Devices
List your devices and identify the ones to which you want to grant the user access. Check thecan_program_online_access_codes capability flag for each device.
- JavaScript
- cURL
- Python
- Ruby
- PHP
- C#
Code:Output:
Create a User Identity
You can create a user identity before creating the Access Grant, you can retrieve an existing user identity, or you can skip this step and create a new user identity as part of the Access Grant creation action. To create a user identity, specify the uniqueuser_identity_key, email_address, or phone_number of the user.
- JavaScript
- cURL
- Python
- Ruby
- PHP
- C#
Code:Output:
Create an Access Grant
To create an Access Grant, specify the user identity, device IDs, starting and ending times, and requested access methods, such ascode.
To grant access to multiple devices at the same time, include all the desired device IDs in the device_ids array. Seam creates the requested access methods on each device.
- JavaScript
- cURL
- Python
- Ruby
- PHP
- C#
Code:Output:
Retrieve the Access Methods
Once an access method has been issued, retrieve it by ID. For acode access method, the returned access method includes the code that you can deliver to your user.
You can poll the access method for the is_issued status change or watch for the access_method.issued event.
- JavaScript
- cURL
- Python
- Ruby
- PHP
- C#
Code:Output:

