# Datacake

## KPN Things: Configure a Datacake destination

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FLnohAmDStfXerXFF5sNu%2Fimage.png?alt=media&#x26;token=3f1577fe-bd03-4da6-900b-9be59d476968" alt=""><figcaption><p>Datacake Destination configuration</p></figcaption></figure>

### Name

Give your Datacake destination a name and optionally a description.

* **Destination name** (required) - the administrative name of your Destination.

  Technical name: `name`

  Example value: *My Datacake destination*
* **Description** - an administrative description of your Destination.

  Technical name: `description`

  Example value: *View my device data in Datacake*

### Connection details

Connectivity type (required) - As part of the set up you will need to choose which connectivity type to use while creating your Devices in Datacake. You can use either LoRaWAN or API with KPN Things depending on the choice of the Connectivity type in Datacake.&#x20;

It is time to create a Datacake account on <https://datacake.co>.

Now, follow the instructions below to create an integration in your Datacake account. Keep your KPN Things Destination configuration screen open, as you will need to copy information to it later.

***

## Datacake: Create an integration

Log in to your Datacake account and go to *Devices.* There, add a new device (by clicking the "Add Device"-button in top right corner) and follow the steps below.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FTYjjK351FSUDqGvr6dfj%2Fimage.png?alt=media&#x26;token=339a608c-e549-481f-93a1-af560362ad14" alt=""><figcaption><p>Choose the connectivity type</p></figcaption></figure>

Choose LoRaWAN for LoRa devices that send raw payloads. For M2M devices or LoRa devices that do not send raw payloads choose API.  The option LoRaWAN also offers the possibilty to send downlinks and to secure the connection between KPN Things and Datacake. For securing the connection between KPN and Datacake you can use a Shared Secret.&#x20;

Click *Next*.

#### 2. Select product

Select a New Product from Template, an Existing Product or create a new Product depending on the device type.&#x20;

Click *Next*.

*In case of LoRaWan*

Select KPN as Network Server and then click Next.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FvsHkCBpBXoDmfjKqVMc0%2Fimage.png?alt=media&#x26;token=baa18351-e8db-4f05-a062-ab94e5c4657d" alt=""><figcaption><p>Select KPN's Network Server</p></figcaption></figure>

*In case API*

There is no Network Server Selection.

#### 3. Add devices

Add one or more devices together with their details. This step is the same for both options (LoRaWAN/API).

Click *Next*

#### 4. Choose the Plan

Click "Add \[*Number of devices]* devices".  This step is the same for both options (LoRaWAN/API).

After that the device(s) should appear in the Device list under *Devices*.

#### 5. Select the device

Select the device from the Device list and go to the Configuration tab.

*In case of LoRaWAN*

In the LoRaWAN section, click the Change button under Network Server and right next to KPN. From there copy the Uplink URL

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FpkoVhGLYG4CuXWF924Ak%2Fimage.png?alt=media&#x26;token=e1e21876-458b-4c12-9ba7-f5c17b55a064" alt=""><figcaption><p>Copy the Uplink URL</p></figcaption></figure>

*In case of API*

In the HTTP endpoint URL section copy the URL.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2Fv013jbXea6UGdKGioWXX%2Fimage.png?alt=media&#x26;token=37ab4d36-8f8e-45b6-b2e4-4fab25c0ba60" alt=""><figcaption></figcaption></figure>

***

## KPN Things: Continue with Configure a Datacake destination

In this step, you need to copy/paste information from Datacake to the Datacake Destination in KPN Things. So pay attention, please.&#x20;

*In case of LoRaWAN*

* **Uplink URL**\
  Paste the URL copied from Datacake mentioned under 5.
* **Shared Secret**\
  With the shared secret Datacake can verify that Things has sent the data and not someone else, because with the shared secret a unique [Things-Message-Token](https://docs.kpnthings.com/kpn-things/building-blocks/destinations/https-destination#things-message-token) is calculated for each message. In Datacake this verification can be switch on In the LoRaWAN section by clicking on the Change button under Network Server and right next to KPN (the same starting point as for obtaing the Uplink URL in case of LoRaWAN).&#x20;

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FX5RcsOwGnnvHpF2QBpnM%2Fimage.png?alt=media&#x26;token=25526fd0-af75-48dd-bfc3-c79f7d6b2bb7" alt=""><figcaption><p>Enabling the use of a shared secret</p></figcaption></figure>

*In case of API*

* **HTTP endpoint URL**\
  Take the HTTP endpoint URL from the HTTP Payload Decoder section on the device Configuration tab.

Then, press *Add* Datacake Endpoint to save the new destination in KPN Things. Do not forget to add the newly created Datacake destination to a flow.&#x20;

Now you are finished and good to go!


---

# 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.kpnthings.com/kpn-things/building-blocks/destinations/datacake.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.
