# Quickstart Guide Welcome to the **Insert Marktplaats API**. This quickstart demonstrates how to authenticate using **OAuth2 client credentials** and make secure API calls. ## Step 1: Register & Obtain Client Credentials 1. Go to the [Insert Sign up page](https://marktplaats.insert.nl/aanmelden). 2. Create an account or log in. 3. Navigate to your [API Dashboard](https://marktplaats.insert.nl/dashboard/api). 4. Create a new **OAuth2 client** to get the following details: - **Client ID** - **Client Secret** > Keep these credentials secure — they are used to authenticate your application. ## Step 2: Request an OAuth2 Access Token Use the **Client Credentials Flow** to obtain an access token. This token allows your application to access protected API endpoints without user interaction. ### Request ```bash curl -X POST https://app.insert.nl/api/v1/oauth/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id={CLIENT_ID}" \ -d "client_secret={CLIENT_SECRET}" ``` ### Response ```json { "access_token": "eyJhbGciOiJIUzI1NiIsInR...", "token_type": "Bearer", "expires_in": 3600 } ``` > **Notes:** - `access_token`: the token used in the `Authorization` header. - `expires_in`: the lifetime of the token in seconds (e.g., 3600 = 1 hour). ## Step 3: Retrieve products via the API Use your access token to make authenticated requests to the Insert Marktplaats API. ### Request ```bash curl -X GET https://app.insert.nl/api/v1/products \ -H "Authorization: Bearer {ACCESS_TOKEN}" \ -H "Accept: application/json" ``` ### Response ```json { "data": [ { "id": 1, "websiteURI": "https://insert.nl", "itemDetails": { "name": "Sustainable garden bench" }, "priceInformation": { "price": 499.95 }, "created_at": "2025-01-01T10:00:00Z", "updated_at": "2025-02-01T10:00:00Z" } ], "links": { "first": "https://app.insert.nl/api/v1/products?page=1", "last": "https://app.insert.nl/api/v1/products?page=10", "next": "https://app.insert.nl/api/v1/products?page=2" }, "meta": { "current_page": 1, "last_page": 10, "per_page": 15, "total": 150 } } ``` ## OAuth2 Client Credentials Flow - Diagram ```mermaid sequenceDiagram participant Client as Your Server participant AuthServer as Insert Auth Server participant API as Insert API Client->>AuthServer: POST /api/v1/token (client_id, client_secret) AuthServer-->>Client: access_token (Bearer) Client->>API: GET /api/v1/products (Authorization: Bearer token) API-->>Client: JSON response (product data) ``` ## Summary 1. Register for **client credentials** in the Insert Developer Dashboard. 2. Use them to request an `access_token` via the **OAuth2 client credentials flow**. 3. Include this token in the `Authorization` header for all API requests. You are now ready to integrate the Insert Marktplaats API into your application!