---
title: Authorization
description: The API uses JSON Web Tokens (JWT) for authorization. It does so by putting the token in the HTTP Authorization header using the bearer schema. More about this can be read here: https://jwt.io/introdu
---

[Skip to content](https://kb.dataintel.dk/authorization#main-content)

English

Show submenu for translations

[Submit a request](https://kb.dataintel.dk/kb-tickets/new?hsLang=en)

![DIAP-1.png\]](https://kb.dataintel.dk/hs-fs/hubfs/DIAP-1.png?height=41&name=DIAP-1.png)

- [Default HubSpot Blog](https://diap-6547305.hs-sites.com/blog)

Open main navigation

Close main navigation

- [Default HubSpot Blog](https://diap-6547305.hs-sites.com/blog)
- English
  
  Show submenu for translations
- [Submit a request](https://kb.dataintel.dk/kb-tickets/new)
- Go to Data Intelligence A/S

 Go to Data Intelligence A/S

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://kb.dataintel.dk/?hsLang=en)
2. [API](https://kb.dataintel.dk/api?hsLang=en)
3. [API](https://kb.dataintel.dk/api?hsLang=en#api)

# Authorization

The API uses JSON Web Tokens (JWT) for authorization. It does so by putting the token in the HTTP Authorization header using the bearer schema. More about this can be read here: [https://jwt.io/introduction/ ](https://jwt.io/introduction/)

To authorize your calls, the following method must be called:

```
Request URL: https://<api-url>/api/account/loginRequest Method: POSTHeader: Content-Type: "application/json"Body:{ "username": "<your e-mail address>", "password": "<password>"}
```

 

If the call succeeds, the response contains a string, which is the JWT Bearer token. It could look like this:

```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyaWQiOiJERmlAZWx0cm9uaWMuZGsiLCJyb2xlIjoiQWRtaW4iLCJuYmYiOjE1NzE4MTQzNTUsImV4cCI6MTU3MTgxNjE1NSwiaWF0IjoxNTcxODE0MzU1fQ.bJgqMq7kl1VIzDHeHt-2lJUq9CzI6rUQKEj5E3xC6NY
```

Add this string with the bearer schema in the Authorization header for following calls.   
**Note that the token has an expiration time of 30 minutes from retrieving it, after which a new token must be retrieved by calling the login method again.**

An example with getting the list of units, which needs authorization, looks like this:

```
Request URL: https://<api-url>/api/Unit/ListUnitsRequest Method: GETHeader: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyaWQiOiJERmlAZWx0cm9uaWMuZGsiLCJyb2xlIjoiQWRtaW4iLCJuYmYiOjE1NzE4MTQzNTUsImV4cCI6MTU3MTgxNjE1NSwiaWF0IjoxNTcxODE0MzU1fQ.bJgqMq7kl1VIzDHeHt-2lJUq9CzI6rUQKEj5E3xC6NY
```

A test user has been created, that can be used in both in the demo and test environment:

```
{ "username": "apitest@diap.online", "password": "Apitest-1234"}
```

- [DIAP Gateway](https://kb.dataintel.dk/diap-gateway?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/diap-gateway?hsLang=en#getting-started)
    - [Troubleshooting](https://kb.dataintel.dk/diap-gateway?hsLang=en#troubleshooting)
    - [Known issues/limitations](https://kb.dataintel.dk/diap-gateway?hsLang=en#known-issues-limitations)
- [General](https://kb.dataintel.dk/general?hsLang=en#main-content)

    - [FAQ](https://kb.dataintel.dk/general?hsLang=en#faq)
- [Configuration](https://kb.dataintel.dk/configuration?hsLang=en#main-content)

    - [FAQ](https://kb.dataintel.dk/configuration?hsLang=en#faq)
    - [Troubleshooting](https://kb.dataintel.dk/configuration?hsLang=en#troubleshooting)
    - [Guides](https://kb.dataintel.dk/configuration?hsLang=en#guides)
    - [Protocols](https://kb.dataintel.dk/configuration?hsLang=en#protocols)
- [Live/Real time site](https://kb.dataintel.dk/live-real-time-site?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/live-real-time-site?hsLang=en#getting-started)
    - [FAQ](https://kb.dataintel.dk/live-real-time-site?hsLang=en#faq)
    - [Guide](https://kb.dataintel.dk/live-real-time-site?hsLang=en#guide)
    - [Features](https://kb.dataintel.dk/live-real-time-site?hsLang=en#features)
- [OEE site](https://kb.dataintel.dk/oee-site?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/oee-site?hsLang=en#getting-started)
    - [FAQ](https://kb.dataintel.dk/oee-site?hsLang=en#faq)
    - [Guides](https://kb.dataintel.dk/oee-site?hsLang=en#guides)
    - [Configuration](https://kb.dataintel.dk/oee-site?hsLang=en#configuration)
- [Remote Access](https://kb.dataintel.dk/remote-access?hsLang=en#main-content)

    - [Getting Started](https://kb.dataintel.dk/remote-access?hsLang=en#getting-started)
    - [FAQ](https://kb.dataintel.dk/remote-access?hsLang=en#faq)
    - [Guides](https://kb.dataintel.dk/remote-access?hsLang=en#guides)
- [API](https://kb.dataintel.dk/api?hsLang=en#main-content)

    - [API](https://kb.dataintel.dk/api?hsLang=en#api)
- [Release information](https://kb.dataintel.dk/release-information?hsLang=en#main-content)

    - [DIAP Release Notes](https://kb.dataintel.dk/release-information?hsLang=en#diap-release-notes)
    - [Live/Real time site](https://kb.dataintel.dk/release-information?hsLang=en#live-real-time-site)
    - [OEE site](https://kb.dataintel.dk/release-information?hsLang=en#oee-site)
    - [Management site](https://kb.dataintel.dk/release-information?hsLang=en#management-site)
    - [DIAP Gateway](https://kb.dataintel.dk/release-information?hsLang=en#diap-gateway)

- [Default HubSpot Blog](https://diap-6547305.hs-sites.com/blog)

[![Chill listening crop-3](https://kb.dataintel.dk/hs-fs/hubfs/Sk%C3%A6rmbillede%202021-05-04%20kl.%2017.46.04.png?width=221&height=26&name=Sk%C3%A6rmbillede%202021-05-04%20kl.%2017.46.04.png "Chill listening crop-3")](https://diap.hubspotpagebuilder.com/-temporary-slug-5b226bcb-69c8-45c1-82ff-e060e2d4037d?hsLang=en)

Copyright © 2026, Data Intelligence A/S