# Megaflex (/en/businesses/integrations/megaflex)



Megaflex is Thril's partner for access control. The integration generates reservation-specific access codes for electronic lock systems and syncs them with your venue's calendar. You can also configure resource-specific settings under each resource's settings.

## Prerequisites [#prerequisites]

You need **Megaflex hardware configured at your venue** and credentials (API URL, tenant ID, username, and private key) from your Megaflex contact person or via [Thril support](mailto:support@thril.fi).

<Callout type="warn">
  If your Megaflex system is connected to another booking system, contact
  Megaflex or [Thril support](mailto:support@thril.fi) before enabling the
  integration.
</Callout>

## To enable [#to-enable]

1. Open **Settings → System → Integrations → Megaflex**
2. Enter the **API URL**, **Tenant ID**, and **Username**
3. Upload your **Private key** (PEM file) provided by Megaflex
4. Set the access times and fallback instructions (see below)
5. Set **Status** to **Active**
6. Select **Save changes**
7. Optionally test the connection under **Actions → Test connection**

## Configuration options [#configuration-options]

* **API URL:** the base URL of the Megaflex API
* **Tenant ID:** your Megaflex tenant identifier
* **Private key:** a PEM file provided by Megaflex used for authentication
* **Access before the reservation** and **Access after the reservation:** how many minutes before the reservation starts and after it ends the access code works
* **Fallback instructions:** a message shown to customers if Thril detects an issue with Megaflex (for example, *"If your access code doesn't work, you can use our backup code 9999#."*). Enable **Always show fallback instructions** to display it to all customers regardless of Megaflex's status. You can also set resource-specific fallback instructions under each resource's settings.

## Syncing existing reservations [#syncing-existing-reservations]

After enabling the integration, select **Actions → Sync future reservations** to push upcoming reservations to Megaflex. This is helpful when you first connect the integration so existing bookings get access codes. The action is available once the integration is active.

## Delete the integration [#delete-the-integration]

Select **Delete integration** to remove the Megaflex settings from your venue. Thril also removes the Megaflex settings of each resource. You can set up the integration again later.

You can't delete the integration while upcoming reservations have an access code in Megaflex, because Thril needs the Megaflex credentials to remove those codes. Delete the integration once those reservations have ended, and set **Status** to **Inactive** in the meantime to stop new codes.

## Troubleshooting [#troubleshooting]

* Use **Actions → Test connection** to fetch your current Megaflex group configuration. Thril support may ask for this information when troubleshooting.
* Inactivating the integration stops **new** reservations from syncing to Megaflex. Reservations already synced are not affected and must be cleaned up manually within Megaflex.
* For help configuring your Megaflex hardware or software outside of Thril, contact your Megaflex contact person. For help with the integration in Thril, contact [Thril support](mailto:support@thril.fi).
