> For the complete documentation index, see [llms.txt](https://docs.akenza.io/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/akenza.io/get-started/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="/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
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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
