An API key lets a script or an integration call the DataTile API on your behalf, without your password. You create keys yourself under My profile → API keys, give each one only the access it needs, and delete it when it is no longer used.
Profile tokens no longer work. Since DataTile 26.11 (November 2026), the token that used to be shown on the Profile page is retired. Existing tokens were not converted, and a request that still sends one is rejected with 401. Create an API key as described below and send it in the Authorization header. See Moving from a profile token.
Before you start
-
You need the Integrator role. Without it the API keys page cannot create a key, and existing keys stop working. A user with the Supervisor role grants it in Access management.
-
Users who held the Data collector role when their server was upgraded to 26.11 received Integrator automatically. Anyone given Data collector later needs Integrator granted separately.
-
A key works only on the DataTile server it was created on. If you use several servers, or your project moved to a new server, create a key on each one.
Create a key
-
Click the user icon in the top right corner, then My profile, then API keys in the left menu.
-
Click Create key.
-
Enter a Name that says what the key is for, for example Weekly data upload. Names must be unique among your keys.
-
Set the Scopes: for each area choose None, View or Edit. At least one area must be View or Edit. See Scopes below.
-
Choose when the key expires: after 1, 6 or 12 months.
-
Click Create.
-
Copy the key and store it somewhere safe, such as a password manager or your scheduler's secret store. This is the only time the key is shown. If you lose it, delete the key and create a new one.
The key is a single string that starts with dtp_. Afterwards the list shows only its last four characters, so you can tell keys apart.
Scopes
A key never has more access than you do: every call is checked against your own roles and your permissions on the folder, database or dashboard. Scopes narrow that down further, so a leaked key can do less damage. Edit includes View.
|
Area |
View allows |
Edit also allows |
|---|---|---|
|
Drive |
Listing and reading folders and the items in them |
Creating folders, changing, moving and sharing items |
|
Dashboard |
Reading dashboards |
Changing dashboards |
|
Database |
Reading databases, exporting codebooks, checking the status of an upload job |
Uploading data, importing codebooks |
What the documented APIs need:
|
API |
Scope |
|---|---|
|
Data Collector API: upload a file |
Database · Edit |
|
Data Collector API: check job status only |
Database · View |
|
Codebook API: export |
Database · View |
|
Codebook API: import |
Database · Edit |
The Dashboard Data API does not use these keys. It uses a separate key that belongs to one dashboard and is copied from that dashboard's API settings.
Use the key
Send the key in the Authorization header with the Bearer scheme on every request:
curl "https://your-server.datatile.eu/api/v2/asyncproc" \
-H "Authorization: Bearer $DATATILE_API_KEY"
import os
import requests
response = requests.get(
"https://your-server.datatile.eu/api/v2/asyncproc",
headers={"Authorization": f"Bearer {os.environ['DATATILE_API_KEY']}"},
)
-
The key is not accepted in the
tokenorX-Auth-Tokenheader, or as a URL parameter. A key sent that way is rejected with401"The API key is invalid". -
Keep the key out of source code and URLs. Read it from an environment variable or a secret store, as in the examples.
-
Use one key per integration. You can then delete or replace one without touching the others.
Expiry and replacing a key
-
Every key expires on the date shown in the list. An expired key is rejected with
401"API key expired". -
DataTile emails you 14 days and 3 days before a key expires.
-
A key cannot be extended and its scopes cannot be changed. To replace a key: create a new one, switch your integration to it, check that Last used on the new key updates, then delete the old one. Both keys work side by side in the meantime.
-
You can hold up to 20 keys. Expired keys count until you delete them.
Delete a key
Click the bin icon next to the key and confirm. The key stops working immediately and cannot be restored. A server administrator can also delete a user's keys.
Moving from a profile token
|
|
Profile token (before 26.11) |
API key |
|---|---|---|
|
Where you get it |
Profile page, Token section |
My profile → API keys |
|
How many |
One per user; generating a new one cancelled the old one |
Up to 20, each deleted separately |
|
Access |
Everything the user can do |
Limited by scopes |
|
Lifetime |
Unlimited |
1, 6 or 12 months |
|
Visible later |
Yes |
No, shown once at creation |
|
Request header |
|
|
|
Role needed |
None |
Integrator |
To move an integration:
-
Create a key with the scopes the integration needs.
-
In your script, replace the
tokenheader withAuthorization: Bearer <key>. Changing only the value and keeping thetokenheader does not work. -
Run the integration once and check the response.
Troubleshooting
Authentication errors come back as JSON. result holds the error code and message the explanation:
{
"available": false,
"failed": true,
"result": "KEY_INVALID",
"status": "UNAUTHORIZED",
"message": "The API key is invalid. Create a new key on the API keys page."
}
|
Status |
Code and message |
Likely cause |
What to do |
|---|---|---|---|
|
401 |
|
The key was sent in the |
Send the full key as |
|
401 |
|
The expiry date has passed. |
Create a new key and delete the expired one. |
|
401 |
No authentication |
The request carried no key at all. |
Add the |
|
403 |
|
You no longer have the Integrator role, or your account is not active. |
Ask a Supervisor to grant Integrator or reactivate the account. The key works again afterwards; no new key is needed. |
|
403 |
|
The key lacks the scope this call needs, for example a Database · View key used for an upload. |
Create a key with the right scope. |
If your server sits behind a proxy that adds its own Authorization header, the key is overwritten on the way and every call returns KEY_INVALID. Ask your network team to pass the header through unchanged.
Problems when creating a key:
-
The key limit is reached. You already hold 20 keys. Delete one you no longer use, expired ones included.
-
The name is taken. Another of your keys has the same name; upper and lower case are not distinguished.
-
Create is unavailable or refused. You do not have the Integrator role.