Website GitHub Try Demo

API Tokens

API Tokens let external systems connect to the OpenMES REST API. Create tokens for ERP platforms, BI tools, mobile apps, and automation scripts.

API Tokens page showing token creation form and usage example

Creating a Token

To create a new API token:

  1. Navigate to Settings → API Tokens.
  2. Enter a clear, descriptive name for the token (e.g., "ERP Sync", "Power BI Reports", "Mobile App").
  3. Click Create Token.
  4. Copy the token string immediately – it is displayed only once and cannot be retrieved later.
Security Best Practice: Create separate tokens for each integration. If a token is compromised, you can revoke it without disrupting other systems. Never share tokens via email or chat – use a secure secrets manager.

How to Use

Include the token in the Authorization header of every API request as a Bearer token:

POST /api/v1/work-orders HTTP/1.1
Host: your-openmes-instance.com
Authorization: Bearer YOUR_TOKEN_HERE
Content-Type: application/json

All standard REST API endpoints accept Bearer token authentication. Refer to your instance's API documentation for available endpoints and request formats.

Power BI Integration: When connecting Power BI to OpenMES, use the API token as the Bearer credential in the Web data source connector. This allows Power BI to pull production data directly for real-time dashboards and reports.

Managing Tokens

The API Tokens page lists all active tokens with their names and creation dates. From this list you can: