API
Authentication
An admin user can generate API keys in the Distru app by following these steps.
Steps:
- Log in to Distru with your admin account.
- Navigate to the Settings page from the left menu.
- Click on Distru API under the Integrations section.
- 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_TOKENEvery request must include your token in the Authorization header using the
Bearer scheme, along with JSON content-type and accept headers:
| Header | Value |
|---|---|
Authorization | Bearer YOUR_API_TOKEN |
Content-Type | application/json |
Accept | application/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.