# Using JSON Web Tokens (JWTs)

## Set up a JWT MQTT data flow

If you are planning to use JWT as authorization method the MQTT data flow needs to be configured accordingly at creation time. Create a new MQTT device connector and select the device authentication **device credentials**.

<figure><img src="/files/KTcpB3HQwhF1KnKhif2F" alt=""><figcaption><p>JWT MQTT Device Connector</p></figcaption></figure>

## Add your public key to Akenza

Create a device and attach it to your JWT MQTT data flow. After that you'll find the option to add your public key file under the tab. Please ensure the key you upload is a **public** key.

<figure><img src="/files/18MED8C6EiT5Ev0dWoxN" alt=""><figcaption><p>Adding Device Credentials (Public Key)</p></figcaption></figure>

## Examples how to create a JWT and upload a datapoint

Select your preferred language:

* [Java](/akenza.io/get-started/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts/java.md)
* [Python](/akenza.io/get-started/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts/python.md)


---

# 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.akenza.io/akenza.io/get-started/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts.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.
