---
updatedAt: 2026-01-26T16:22:28.000Z
agentTools:
  projectIndex: https://docs.nextpertise.nl/llms.txt
---

# Obtaining your API token

```python Python
import requests

# Configure the Nextpertise API location & credentials
NEXTPERTISE_API = "https://api.nextpertise.nl"
API_USER_USERNAME = "api-user@your-domain.nl"
API_USER_PASSWORD = "password"

# Let's get the token!
response = requests.get(
    f"{NEXTPERTISE_API}/jwt/log-in",
    auth=(API_USER_USERNAME, API_USER_PASSWORD),
)
response.raise_for_status()  # Check if the request was successful
print(response.json())
# {'access_token': 'XXXX', 'expires_in': 43200, 'token_type': 'Bearer'}

token = response.json()["access_token"]
print(f"Your API token is {token}")
# Your API token is XXXX
```

```shell cURL
curl -u api-user@your-domain.nl:password https://api.nextpertise.nl/jwt/log-in
```

```json Response Example
{
  "access_token": "XXXX",
  "expires_in": 43200,
  "token_type": "Bearer"
}
```

# Create a new user in InControl

<!-- python@5-6 -->
<!-- shell@1 -->

It is recommended to have a separate user for your API integrations. An organization admin can create new user on [InControl Create User](https://incontrol.nextpertise.nl/admin/users/create) page. 

A link to set the user password will be send to the email provided in the create user form.

# Configure the API location & user credentials

<!-- python@3-7 -->
<!-- shell@1 -->

Set the Nextpertise API location and the credentials of the user for which you want to enable the API.

# Request a new API token

<!-- python@9-24 -->
<!-- shell@1 -->

We can request a new API token by logging in, using the endpoint described on the [Authentication](https://docs.nextpertise.nl/reference/authentication) page.