Check the connection path
Confirm the lock works in its manufacturer app and has the connection hardware its model requires. A Yale brand name alone does not establish which functions a device supports. Check the returned capability flags before using an operation.
Create a Seam account and get an API key. Use a sandbox workspace for virtual devices, or a production workspace for real locks. Keep the API key on your server.
1. Install the SDK
2. Connect the Yale account
Create a Connect Webview and send its URL to the person who owns the Yale account. Use theyale provider key for this connection path.
JavaScript
jane@example.com, password 1234, and verification code 123456. These credentials are only for virtual devices.
After the user finishes, retrieve the Connect Webview and list devices for that specific account:
JavaScript
device_id. Do not automatically grant access to the first device returned from a customer’s account.
3. Grant scheduled guest access
Use Access Grants for a guest’s access lifecycle. The example below creates one code method for a keypad lock. Other credential types depend on the device and integration. SetYALE_DEVICE_ID to the chosen virtual lock, then run this example on your server. It starts five minutes from now, uses whole-minute boundaries, and ends one hour later. For a real booking, convert the property’s local check-in and checkout times to ISO timestamps with an explicit UTC offset.
JavaScript
Check issuance before sharing the code
A successful create request is not confirmation that the lock has received its code. Read the related access methods, or subscribe to access method events.JavaScript
ready is false, retain a pending state and check the grant and method errors. Retry status checks with a bounded timeout or process the subsequent webhook. Share the method’s code through your guest delivery flow only after issuance is confirmed. Do not log guest codes in production.
Change or cancel the booking
Update the existing grant when checkout changes. Read it back and track the access method’s pending changes before reporting completion.JavaScript
Remote lock and unlock
For a direct remote command, checkcan_remotely_lock or can_remotely_unlock, then use Lock Door or Unlock Door. These commands return an action attempt. They do not grant a guest ongoing access.
Troubleshooting
See the Yale error reference for provider-specific checks. For an application that pushes reservation data and lets Seam manage automations, continue with Reservation Automations.