---
title: Obtaining an API token
slug: how-tos/-VR6-obtain
docTags: 
createdAt: 2025-08-25T18:23:36.866Z
---

In this guide, we will obtain an API token for interfacing with Factry Historian's REST API.

## What is an API token

An API token is required to authenticate external tools or custom applications with Factry Historian. Instead of using a username and password for each request, a token provides a secure and convenient way to grant access. Tokens can be scoped to a specific organization and set with limited rights, which helps keep integrations safe and manageable.

## Step-by-step guide

**As an administrator in Factry Historian:**

- Go to the Historian web app **Configuration > Users**.
- Select the user with read privileges and click the edit icon on the right.
  ![](https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-64FUaYBf8MHJv8G1lLUqM-20250827-185119.png)

**As a regular user in Factry Historian:**

- Go to the Historian web app, and click your profile on the bottom right, and then select **User Profile**.

**Next:**

- Navigate to the 'Tokens' tab and click **+ Generate API token**.
  ![](https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-HvjTN3OZO9roGflOcSudP-20250827-183910.png)
- Give the token a Name and an optional expiry date. Then click **Submit**.
  ![](https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-zwsgkjb-9n-O_PVcwFAfn-20250827-185401.png)
- Copy the generated token somewhere safe by either selecting and copying, or by clicking **Copy to clipboard**.
  ![](https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-3b11ycvcgKzw6V0q-6QfG-20250827-185519.png)

## Use cases for API tokens

API tokens are needed for:

- [Configuring the Excel Add-in](docId\:y6tUqFJPLisSSz44WJM8h)
- Configuring the Seeq Add-in
- [Configuring the Grafana Datasource Plugin](docId\:q9t7hXoxsKNYLaWPorfdD)
- [Using the Factry Historian REST-API](docId\:LSpqIqL9j4kYFSa1NMf4A) e.g. with Python

## Notes

- Tokens are sensitive credentials; treat them like passwords.
- Copy a token when it is created, as it will only be shown once.
- You can revoke or regenerate tokens at any time if they are lost or compromised.
