API

Authentication

An admin user can generate API keys in the Distru app by following these steps.

Steps:

  1. Log in to Distru with your admin account.
  2. Navigate to the Settings page from the left menu.
  3. Click on Distru API under the Integrations section.
  4. Use the Create API Key option to generate your API token.

Using your API token

Example authenticated request

GET /public/v1/orders
content-type: application/json
accept: application/json
authorization: Bearer YOUR_API_TOKEN

Every request must include your token in the Authorization header using the Bearer scheme, along with JSON content-type and accept headers:

HeaderValue
AuthorizationBearer YOUR_API_TOKEN
Content-Typeapplication/json
Acceptapplication/json

Treat your token like a password: it carries the same permissions as the admin who created it. Keep it server-side and never expose it in client-side code.

OAuth access tokens issued for Distru MCP authenticate only at the MCP endpoint. They cannot be used directly with the public API.

On this page