# Creating Lockly Offline Access Codes

In addition to supporting [online access codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes), the Seam integration for Lockly supports the generation of offline access codes for all Lockly lock models that have a keypad. You generate offline access (PIN) codes remotely, and the manufacturer maintains a server-based registry of synchronized encryption keys (tokens) to enable these offline codes. Then, owners or managers can share these codes with users through messaging or other similar applications, and the users do not need to install a special application to unlock the device.

For Lockly locks with keypads, you can program [time-bound](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/offline-access-codes#creating-time-bound-offline-access-codes) and [one-time-use](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/offline-access-codes#creating-one-time-use-offline-access-codes) offline access codes. To define the validity period for each Lockly offline access code, specify the desired `starts_at` and `ends_at` timestamp. You can create as many offline access codes as you'd like, up to the limits of your device memory capacity and your Lockly subscription. You can verify your Lockly subscription in the [Lockly Access Portal](https://lap.lockly.com/lap/index.html#/login).

{% hint style="info" %}
It is important to inform your Lockly lock users that the mechanism for entering offline access codes on Lockly devices is different from the mechanism for entering online access codes on these devices. For instructions, see <https://www.support.lockly.com/faq/how-to-use-oac/>.
{% endhint %}

For more information about using offline access codes, see [Offline Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes#offline-access-codes) and [Managing Offline Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/offline-access-codes).

***

## Programming Lockly Offline Access Codes

For detailed instructions for creating time-bound offline access codes for Lockly locks, see [Creating Time-Bound Offline Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/offline-access-codes#creating-time-bound-offline-access-codes).

For detailed instructions for creating one-time-use offline access codes for Lockly locks, see [Creating One-Time-Use Offline Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/offline-access-codes#creating-one-time-use-offline-access-codes).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seam.co/latest/device-and-system-integration-guides/lockly-locks/creating-lockly-offline-access-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
