Getting an authentication token via the API
Who is this article for?
Administrators who want to learn to get an authentication token via the API.
Administrator permissions are required.
This article explains how to obtain an authentication token using the POST /api/auth/token endpoint for anonymous authentication.
Understanding the authentication endpoint
The POST /api/auth/token endpoint provides anonymous authentication. You send your username, password, and API key in the JSON request body. The API key is only required for this initial authentication call and is not sent on subsequent API requests.
Sending the authentication request
To Ideagen Supply Chain and obtain a token:
- Send a POST request to
/api/auth/token. - Include the following JSON in the request body:
{
"username": "tenant.admin@example.com",
"password": "<Disclose password>",
"apiKey": "<key from Import API Credentials>"
}The request body requires three fields:
- username (required) – Disclose login (email) of a Tenant Administrator
- password (required) – That user's Disclose password
- apiKey (required) – Tenant API key from Ideagen
Understanding the success response
A successful authentication returns a 200 OK response with the following JSON structure:
{
"accessToken": "<JWT>",
"tokenType": "Bearer",
"expires": "2026-09-01T10:09:00.1968846Z",
"tenantId": 1
}The response includes:
- accessToken – JSON Web Token (JWT) to use for subsequent API calls
- tokenType – Authentication type (Bearer)
- expires – Token expiration date and time
- tenantId – Your tenant identifier