Overview
Ultraloq locks support two types of access codes:- Permanent access codes — Codes without start or end times that work indefinitely
- Time-bound access codes — Codes that automatically activate and deactivate at specific times
Before You Begin
To create access codes for an Ultraloq device:- Your Ultraloq device must be connected to Seam
- For time-bound access codes only: Device timezone must be configured
- Device must have
can_program_online_access_codes: true
Creating Permanent Access Codes
Permanent access codes work indefinitely until you delete them. They do not require timezone configuration.Creating Time-Bound Access Codes
Time-bound access codes automatically activate and deactivate at specified times. They require timezone configuration.How Time Zone Conversion Works
When you create a time-bound access code:- You provide: UTC timestamps (
starts_atandends_at) - Seam converts: UTC → Device local time using the configured timezone
- Ultraloq schedules: Code activation/deactivation in device’s local time
- Seam stores: UTC timestamps for consistent time representation
Access Code Requirements
Code Format
Ultraloq access codes must be:- Numeric only — Only digits 0-9
- 4-8 characters long — Examples:
"1234","567890","12345678"
Auto-generated codes: If you omit the
code parameter, Seam automatically
generates a random 4-8 digit numeric code.Valid Examples
Invalid Examples
Checking Device Readiness
Before creating time-bound access codes, verify that the device’s timezone is configured:Disabled Access Codes
Users can disable access codes through the Ultraloq mobile app. When this happens, Seam detects the change and adds a warning to the access code.Detecting Disabled Codes
Resolution: The user must re-enable the code in the Ultraloq mobile app.
Seam cannot programmatically re-enable disabled codes. Once re-enabled in the
app, Seam will automatically detect the change and clear the warning.
Validation and Error Handling
Time-Bound Code Without Timezone
If you attempt to create a time-bound code without configuring the device’s timezone:/devices/report_provider_metadata. See Configuring Ultraloq Device Timezones.
Invalid Code Format
If you provide a code that doesn’t meet the 4-8 digit numeric requirement:Missing Time Bounds
If you provide onlystarts_at or only ends_at:
starts_at and ends_at, or omit both for a permanent code.
Invalid Time Ordering
Ifends_at is before starts_at:
starts_at comes before ends_at.
Best Practices
1. Use Auto-Generated Codes
For better security, let Seam generate random codes instead of using predictable patterns:2. Check Timezone Before Creating Time-Bound Codes
Always verify timezone configuration before attempting to create time-bound codes:3. Monitor Access Code Warnings
Regularly check access code warnings to detect disabled codes:4. Use UTC Timestamps
Always provide timestamps in UTC (ISO 8601 format with ‘Z’ suffix):Troubleshooting
Code Not Appearing on Device
If an access code doesn’t appear on the physical device:- Verify the code status is
set(notsettingorunset) - Check for warnings on the access code
- Ensure the device is online and connected to Wi-Fi
- Wait a few minutes for synchronization
Time-Bound Code Activates at Wrong Time
If a time-bound code activates at an unexpected time:- Verify the device’s timezone is correctly configured
- Check
device.properties.ultraloq_metadata.time_zone - Ensure you provided UTC timestamps (with ‘Z’ suffix)
- Recalculate the local time conversion to verify correctness
Code Validation Errors
If you receive validation errors when creating codes:- Invalid format: Ensure code is 4-8 numeric digits
- Timezone required: Configure device timezone for time-bound codes
- Missing time bounds: Provide both
starts_atandends_at, or neither - Invalid ordering: Ensure
starts_atis beforeends_at
API Reference
For complete API documentation, see:Next Steps
- Learn about timezone configuration: See Configuring Ultraloq Device Timezones
- Understand code constraints: See Understanding Code Constraints
- Review the setup guide: See Ultraloq Setup Guide
- Explore access code webhooks: See Webhooks