> For the complete documentation index, see [llms.txt](https://docs.akenza.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akenza.io/device-management/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts.md).

# 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="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2Fqt9PgWGsHyxAtRamCw4t%2Fscreely-1742571013948.png?alt=media&amp;token=09fc2df0-ffcb-49d9-bc52-4fb637ae69e0" 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="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FA0GKvcbrs7n68hhiPDzo%2Fscreely-1742571383092.png?alt=media&amp;token=6643510a-60dd-4e70-aac2-ec99be1ea279" 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](/device-management/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts/java.md)
* [Python](/device-management/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts/python.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akenza.io/device-management/your-data-flow/device-connector/device-security/using-device-credentials/using-json-web-tokens-jwts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
