> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ofiniti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Obtain and use OAuth 2.0 client-credentials access tokens for the FuelBoss API.

The FuelBoss API uses OAuth 2.0 Client Credentials Grant for API authentication. This flow is designed for server-to-server communication where your system authenticates directly with our API.

## Getting access credentials

Contact FuelBoss [itops@ofiniti.com](mailto:itops@ofiniti.com) to receive your:

* `client_id` - Unique identifier for your company
* `client_secret` - Secret key for authentication (keep secure)

## Token request

**Endpoint:** `POST /oauth/token`

**Request Headers:**

```http theme={null}
Content-Type: application/x-www-form-urlencoded
```

**Request Body:**

```text theme={null}
grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
```

**Success Response (200 OK):**

```json theme={null}
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600
}
```

**Error Response (400 Bad Request):**

```json theme={null}
{
  "error": "invalid_request",
  "error_description": "grant_type is required"
}
```

## Using the access token

Include the access token in all API requests:

**Request Headers:**

```http theme={null}
Authorization: Bearer YOUR_ACCESS_TOKEN
```

**Token Lifecycle:**

* **Validity:** 60 minutes (3600 seconds)
* **Renewal:** Request new token before expiration
* **Scope:** Automatically limited to your company's data


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.