This section contains instructions for creating an Application.
Adding Applications using the Console
In addition to the written instructions below, a video with instructions for adding an application is available on The Things Network youtube channel.
Go to Applications in the top menu, and click + Add Application to reach the application registration page. Fill the application ID. The other fields are optional.
Click Create Application to create the application.
Your application will be created and you will be redirected to the application overview page of your newly created application.
Adding Applications using the CLI
Create the first application:
APP_ID="app1" USER_ID="admin" ttn-lw-cli applications create $APP_ID --user-id $USER_ID
This creates an application
app1 with the
admin user as collaborator. Make sure to modify user parameters according to your setup.
End devices are also created within applications. See Adding Devices for more information.
Create Application API Key
Some applications require an API Key to write downlink traffic, read uplink traffic, manage integrations, etc. In this section we explain how to create an application API key on some basic examples, but this procedure is identical for any other right as well.
To create an API key for your application, navigate to API Keys on the left hand menu of your application’s settings and select Add API Key.
Enter a Name for your key, set the Expiry date, select rights that you want to grant and then press Create API Key.
You will see a screen that shows your newly created API Key. You now can copy it in your clipboard by pressing the copy button. After saving the key in a safe place, press I have copied the key. You will not be able to see this key again in the future, and if you lose it, you can create a new one by following this same procedure.
To create an API key for your application with a Delete application right:
API_KEY_NAME="API key for deleting my application" ttn-lw-cli applications api-keys create \ --name $API_KEY_NAME \ --application-id $APP_ID \ --right-application-delete
The CLI will return an API key such as
NNSXS.RLA7AGGMD5ZHBH.... This API key has only delete rights and can therefore only be used for deleting this application. Make sure to copy the key and save it in a safe place. You will not be able to see this key again in the future, and if you lose it, you can create a new one by following this same procedure.
See the CLI Reference for details on managing application API keys using the CLI.
Payload Encryption and Decryption
LoRaWAN® frames are encrypted and decrypted on the application layer using the AppSKey by default.
Once the application is created, you can update your application settings to skip uplink payload decryption and downlink payload encryption. This will cause the Application Server to forward messages to integrations without any processing, for example it will neglect payload formatters, meaning the integrations will be responsible for decrypting uplink messages in order to understand them. Also, scheduling downlinks from The Things Stack will be restricted, as it is expected for downlinks in that case to be scheduled from integrations.
To configure this setting, navigate to your applications’s General settings tab in the Console and check the Enabled box under Skip payload encryption and decryption section.