Page Introduction
Onboarding step guide
This step gives implementation-level instructions for frontend engineers integrating authentication and protected Workshop calls.
- Apply this step in your client API layer before feature work.
- Use examples directly in local test environment.
- Move to the next step only when this one is verified.
Onboarding Step 1
Where to get your API key
MinBil Workshop API uses an API key for gateway protection. This key must be sent on all requests that require `APIKey` authentication.
Steps
- Get the API key from the MinBil team (separate keys for dev/test/prod).
- Store the key in a secure environment variable, never hardcode it in client code.
- Validate the key with a simple auth request and verify expected response behavior.
Recommended environment setup
# .env.local MINBIL_API_BASE_URL=http://localhost:5000 MINBIL_API_KEY=replace_with_real_key
Validation with Axios
import axios from "axios";
const BASE_URL = process.env.MINBIL_API_BASE_URL!;
const API_KEY = process.env.MINBIL_API_KEY!;
async function checkApiKey() {
const response = await axios.post(
BASE_URL + "/api/ws/auth/sign-in",
{ email: "demo@minbil.no", password: "secret" },
{
headers: {
"Content-Type": "application/json",
"x-api-key": API_KEY,
},
},
);
return response.data;
}