---
title: Integration with Tedee Lock using PAK
description: Note!: The following instruction is dedicated for the second generation of HTTP Gate module! The manual shows how to integrate the Grenton system with Tedee lock. The integration is for API version 1.
---

[Skip to content](https://knowledgebase.grenton.com/en/gate-http-integration-with-tedee-lock-using-pak#main-content)

English

Show submenu for translations

[New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new?hsLang=en) [Customer portal](https://knowledgebase.grenton.com/wsparcie?hsLang=en)

![Logo\_Grenton\_Main\_2020\_RGB\_v1.0-1.png\]](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_Main_2020_RGB_v1.0-1.png?width=200&height=94&name=Logo_Grenton_Main_2020_RGB_v1.0-1.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new)
- [Customer portal](https://knowledgebase.grenton.com/wsparcie)
- [Trainings](https://www.grenton.com/cooperation/trainings.html)

[Trainings](https://www.grenton.com/cooperation/trainings.html)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://knowledgebase.grenton.com/en?hsLang=en)
2. [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en)
3. [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)

# Integration with Tedee Lock using PAK

**Note!:** The following instruction is dedicated for the second generation of HTTP Gate module!

The manual shows how to integrate the Grenton system with Tedee lock. The integration is for API version 1.25 and is based on the information posted at:  
[https://tedee-tedee-api-doc.readthedocs-hosted.com/en/latest/index.html](https://tedee-tedee-api-doc.readthedocs-hosted.com/en/latest/index.html)  
[https://api.tedee.com/](https://api.tedee.com/)

In the previous instruction ([link](https://bazawiedzy.grenton.pl/gate-http-integration-with-tedee-lock?hsLang=en)) the ROPC authentication method was used - support for this method has been terminated. The following instruction presents the authentication with a personal key - Personal Access Key (PAK).

**Tedee:**

1\. Integration should begin by creating an account, pairing the lock with a mobile device, calibrate the lock and control it from the dedicated application.

 

2\. If the previously described steps have been performed correctly, you can proceed to obtain a Personal Access Key (PAK). Go to [https://portal.tedee.com/](https://portal.tedee.com/) and log in to the mobile application.

 

3\. Please note that the Personal Access Key (PAK) is assigned to your account and not to a specific lock!

 

After logging in click the icon in the upper right corner and select the "Personal access keys" option:

**Note: **The personal access key (PAK) is assigned to your account and not to a specific lock!

3\. After logging in click the icon in the upper right corner and select the "Personal access keys" option:![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35157962283originalhngg2TnhScq69xCn0Vy19Mlu2G7-H7B39A-2.png)

4\. If you are logging in for the first time, add a new key:![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35157962501originalwsKzCCC7e0eZruXoFtOJD-pATgYXyGBuTg-2.png)

In order to generate a personal key, you need to specify its name, expiry time and the permissions it will have. 

(Check: Operate Lock, Device Read) 

**Note:** The maximum validity period of a Personal Key is 5 years!

After entering the required data and confirming it a window with a new key will appear:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156104556originalv9Z1ww58vIDbFt0xSwFiRtIPcYtNFCjC4Q-2.png)

**Note**: You can see the key only once, so be sure to save it. If you lose the key, you will need to create a new one.

**Grenton:**

For integration Tedee lock with Grenton system, follow these steps.

1\. Create the following variables in the *User features* of the Gate HTTP module:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156105109originalzcJ6f3sJg1tXf_689zUrSYACTJG1Qp4IuA-2.png)

**Note!** The initial value of the*** tedee\_PAK*** feature is the key previously copied from [https://portal.tedee.com/](https://portal.tedee.com/).

**Note!** The initial value of the ***tedee\_lock\_sn*** feature is the serial number of your lock. This information is available in dedicated application:* My devices -\> Lock -\> Settings -\> Information*.

2\. Create a ***HttpRequest* **virtual object:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156105153originalm2MyhPkjJ-zcxbTWxGD7SFq3VutxIglGWw-2.png)

3\. The settings for the*** TedeeLock\_DeviceID ***virtual object that allows to get the lock ID are as follows:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35157965010originalabsT3Ezlst7VpxwooTGfbfco9f6MjZgP_w-2.png)

where:  
**Host:** [https://api.tedee.com](https://api.tedee.com/)  
**Path:** /api/v1.25/my/lock  
**QueryStringParams:** \\z

4\. Create a ***Tedee\_DeviceID\_req ***script:

```
local key = "Authorization: PersonalKey " .. Gate_HTTP->tedee_PAK .. "\r\n" Gate_HTTP->TedeeLock_DeviceID->SetRequestHeaders(key) Gate_HTTP->TedeeLock_DeviceID->SendRequest()
```

5\. Create a ***Tedee\_DeviceID\_resp ***script:

```
if(Gate_HTTP->TedeeLock_DeviceID->StatusCode==200) then local resp = Gate_HTTP->TedeeLock_DeviceID->ResponseBody Gate_HTTP->tedee_lock_sn_get=resp.result[num].serialNumberif(Gate_HTTP->tedee_lock_sn==Gate_HTTP->tedee_lock_sn_get) then Gate_HTTP->tedee_lock_id = resp.result[num].id else Gate_HTTP->Tedee_DeviceID_resp(num+1) end end
```

where ***num*** variable is a parameter of this script:![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156105915originaljo4RSQVcWEUUFmKUzrGrBKo4G4DmLxvpTQ-2.png)

**Note!** One Bridge and one Tedee lock were used in the shown example.

6\. Assign this script with a ***num*** parameter value equal to 1 to the* OnResponse *event of the ***TedeeLock\_DeviceID***  virtual object:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156106049originalTF6qreHuMrARelQgZw9O_0X2L39rRsh_bw-2.png)

7\. By sending the configuration to the CLU and calling the ***Tedee\_DeviceID\_req*** script, the user features in the Gate module should take the appropriate values:

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156106352originalfossThp6-Ymr61YhcduasRDnM6j3_0jFqA-2.png)

8\. Next, we create another ***HttpRequest*** virtual object. The settings for the ***TedeeLock\_LockID*** virtual object that allows to get information about the lock (such as device status, battery level, among other things) are as follows:   
![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156106846originalpcw43Jk2c7jlkBSNR_aVVF2dKHqLzme94Q-2.png)

where:

**Host:** [https://api.tedee.com](https://api.tedee.com/)  
**Path:** /api/v1.25/my/lock/  
**QueryStringParams:** \\z

9\. Create***Tedee\_LockID\_req ***script:

```
local path_1 = "/api/v1.25/my/lock/" .. Gate_HTTP->tedee_lock_id .. "/sync" Gate_HTTP->TedeeLock_LockID->SetPath(path_1) local key = "Authorization: PersonalKey " .. Gate_HTTP->tedee_PAK .. "\r\n" Gate_HTTP->TedeeLock_LockID->SetRequestHeaders(key) Gate_HTTP->TedeeLock_LockID->SendRequest()
```

10\. Create ***Tedee\_LockID\_resp ***script:

```
if(Gate_HTTP->TedeeLock_LockID->StatusCode==200) then local resp = Gate_HTTP->TedeeLock_LockID->ResponseBody Gate_HTTP->tedee_lock_state = resp.result.lockProperties.state Gate_HTTP->tedee_lock_charging = resp.result.lockProperties.isCharging Gate_HTTP->tedee_lock_battery = resp.result.lockProperties.batteryLevel end
```

11\. Assign this script to the OnResponse event of the ***TedeeLock\_LockID*** virtual object:   
![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156107050originalm9L4mGoMh0oDGnzm0X3ZpVDm89vedqbyYA-2.png)

12\. By sending the configuration to the CLU and calling the ***Tedee\_DeviceID\_req ***and then ***Tedee\_LockID\_req*** scripts, the *User features *in the Gate module should take the appropriate values:![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35156107238originalAIodNaQz4uyVBRBP7JyV9TH_rx9UC-he4g-2.png)

13\. Next, create another ***HttpRequest*** virtual object. The settings of the ***TedeeLock\_Actions ***virtual object look as follows: ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35157967752originalFk2QtKx0ela5Kk30fOWTU0wXMJ89CVQUhg-2.png)where:

**Host:** [https://api.tedee.com](https://api.tedee.com/)  
**Path:** /api/v1.25/my/lock/  
**QueryStringParams:** \\z

14\. Next, create the ***Tedee\_Action\_Open\_req*** script, which when called after the configuration is submitted, will open the lock:

```
local path_1 = "/api/v1.25/my/lock/" .. Gate_HTTP->tedee_lock_id .. "/operation/unlock" Gate_HTTP->TedeeLock_Actions->SetPath(path_1) local key = "Authorization: PersonalKey " .. Gate_HTTP->tedee_PAK .. "\r\n" Gate_HTTP->TedeeLock_Actions->SetRequestHeaders(key) Gate_HTTP->TedeeLock_Actions->SendRequest() 
```

15\. Similarly, create the*** Tedee\_Action\_Close\_req*** script, which when called after submitting the configuration, will close the lock:

```
local path_1 = "/api/v1.25/my/lock/" .. Gate_HTTP->tedee_lock_id .. "/operation/lock" Gate_HTTP->TedeeLock_Actions->SetPath(path_1) local key = "Authorization: PersonalKey " .. Gate_HTTP->tedee_PAK .. "\r\n" Gate_HTTP->TedeeLock_Actions->SetRequestHeaders(key) Gate_HTTP->TedeeLock_Actions->SendRequest() 
```

16. Next, create the ***Tedee\_Action\_Pull\_req*** script, which, when called after the configuration is uploaded, will pull back the latch when the door is open:

```
local path_1 = "/api/v1.25/my/lock/" .. Gate_HTTP->tedee_lock_id .. "/operation/pull" Gate_HTTP->TedeeLock_Actions->SetPath(path_1) local key = "Authorization: PersonalKey " .. Gate_HTTP->tedee_PAK .. "\r\n" Gate_HTTP->TedeeLock_Actions->SetRequestHeaders(key) Gate_HTTP->TedeeLock_Actions->SendRequest() 
```

17\. Finally, assign the ***Tedee\_DeviceID\_req ***script call to the *OnInit *event in the Gate Http module:![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35157967807originaljUJ6jLdS5YoDAuKawPpJZ1gtrKVbw2pk5g-2.png)

18\. And place the call to the ***Tedee\_LockID\_req*** script in the ***Tedee\_DeviceID\_resp*** script:

```
if(Gate_HTTP->TedeeLock_DeviceID->StatusCode==200) then local resp = Gate_HTTP->TedeeLock_DeviceID->ResponseBody Gate_HTTP->tedee_lock_sn_get=resp.result[num].serialNumber if(Gate_HTTP->tedee_lock_sn==Gate_HTTP->tedee_lock_sn_get) then Gate_HTTP->tedee_lock_id = resp.result[num].id Gate_HTTP->Tedee_DeviceID_resp() else Gate_HTTP->Tedee_DeviceID_resp(num+1) end end
```

19. The configuration created this way is sent to the Gate HTTP module.

How to control Tedee lock using myGrenton application is presented in the following article:

[Control with Tedee lock (PAK)](https://knowledgebase.grenton.com/control-with-tedee-lock-pak?hsLang=en)

<https://bazawiedzy.grenton.pl/control-with-tedee-lock?hsLang=en>

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/support.grenton.plensupportsolutionsarticles35000191687-gate-http-integration-with-tedee-lock-using-pakhit-1.gif)

- [Installation guidelines](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#main-content)

    - [How to Prepare Electrical Installation](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#how-to-prepare-electrical-installation)
- [Reference devices](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#main-content)

    - [Integrated Device](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#integrated-device)
- [Most Common Mistakes](https://knowledgebase.grenton.com/en/most-common-mistakes?hsLang=en)
- [Electrical Installation](https://knowledgebase.grenton.com/en/electrical-installation?hsLang=en)
- [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en#main-content)

    - [Gate Modbus](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-modbus)
    - [Training](https://knowledgebase.grenton.com/en/manuals?hsLang=en#training)
    - [SW Applications](https://knowledgebase.grenton.com/en/manuals?hsLang=en#sw-applications)
    - [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)
    - [Smart Panel](https://knowledgebase.grenton.com/en/manuals?hsLang=en#smart-panel)
    - [Configuration](https://knowledgebase.grenton.com/en/manuals?hsLang=en#configuration)
    - [myGrenton interfaces](https://knowledgebase.grenton.com/en/manuals?hsLang=en#mygrenton-interfaces)
    - [Virtual Objects](https://knowledgebase.grenton.com/en/manuals?hsLang=en#virtual-objects)
    - [Gate Alarm](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-alarm)
- [Intercom](https://knowledgebase.grenton.com/en/intercom?hsLang=en)
- [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#main-content)

    - [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#faq)
    - [About Grenton](https://knowledgebase.grenton.com/en/faq?hsLang=en#about-grenton)
- [Price list and documents](https://knowledgebase.grenton.com/en/price-list-and-documents?hsLang=en)

[![Grenton logo](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png?width=400&height=100&name=Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png "Grenton logo")](http://grenton.com)

<https://www.facebook.com/grenton.smart.home> <https://www.instagram.com/grenton_smart_home/> <https://www.youtube.com/channel/UCFNNI-dgO1cm81kCrSr1bzg> <https://www.linkedin.com/company/grenton>

Copyright © 2026, Grenton Sp.z o.o.