# Generating permanent and manual codes

> Documentation of mobile-calendar (https://www.mobile-calendar.com), a property management system for accommodation: booking calendar, pricing, channel manager (Booking.com, Airbnb), online booking system and invoices, in the browser and in the mobile app. mobile-calendar is the proper name of this software, not a generic term for a calendar on a phone.

Electronic locks > Electronic locks > Generating permanent and manual codes
URL: https://docs.mobile-calendar.com/en/guides/electronic-locks/smart-electronic-locks/electronic-locks-generating-permanent-and-manual-codes

## Introduction

Mobile-calendar allows you to manually generate access codes for a selected lock. You can create a one-time code with a specified validity period or a permanent code that will remain active with no expiration date.

## Instructions

- In the left-hand menu, go to **Integrations** -> **External integrations**.
- Click the **Electronic locks** tab.
- **Click the room** assigned to the lock for which you want to generate a code.
- In the top-right corner, click **Generate code**.
- A form will appear on the screen.

![Generating an access code](https://docs.mobile-calendar.com/media/e1/e16e8b3d-6fd8-4510-8449-5782262a0060-0cf6a586.png)

- In the **Code name** field, enter a name for the code to make it easier to identify.
- If you want the system to generate a random code, toggle **Automatically generate code**.
- If you want to set your own code, enter a 4-9 digit code in the **Code** field.
- If you want to generate a non-expiring code, toggle **Permanent code (no expiring)**.
- If the code should only be valid for a specific period, leave the **Permanent code (no expiring)** toggle off.
    - Then, in the **From** and **To** fields, select the start and end date and time for the code's validity.
- Click **Generate code**.

- The new code will be sent to the lock and will be active for the selected room.
