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

# Installation

> Install, authenticate, and configure the official VZaps Java SDK

The official VZaps Java SDK wraps authentication, HTTP calls, required headers, realtime events, and the main public API resources.

Use it in Java backends, Spring Boot services, jobs, CLIs, and server-to-server automations.

## Requirements

| Resource | Version               |
| -------- | --------------------- |
| Java     | 11 or higher          |
| Package  | `com.vzaps:vzaps-sdk` |

## Install

```xml theme={null}
<dependency>
  <groupId>com.vzaps</groupId>
  <artifactId>vzaps-sdk</artifactId>
  <version>0.1.0</version>
</dependency>
```

```kotlin theme={null}
dependencies {
  implementation("com.vzaps:vzaps-sdk:0.1.0")
}
```

## Create the client

```java theme={null}
import com.vzaps.VZapsClient;

try (VZapsClient client = VZapsClient.builder()
    .clientToken("your-client-token")
    .clientSecret("your-client-secret")
    .build()) {
  System.out.println(client.instances().list());
}
```

## Credentials

| Credential      | Where to use       | Description                                          |
| --------------- | ------------------ | ---------------------------------------------------- |
| `clientToken`   | Client builder     | Account client token, also sent as `X-Client-Token`. |
| `clientSecret`  | Client builder     | Secret used by the SDK to obtain and refresh JWTs.   |
| `instanceToken` | Each instance call | Instance token, sent as `X-Instance-Token`.          |

Do not expose `clientSecret` or `instanceToken` in public front ends.

## Automatic authentication

The SDK obtains a JWT with `clientToken` and `clientSecret`, caches it in memory, and refreshes it before expiry.

```java theme={null}
String accessToken = client.auth().getAccessToken();
```

## Client options

| Option             | Default     | Use                               |
| ------------------ | ----------- | --------------------------------- |
| `connectTimeout`   | 10 seconds  | TCP connection timeout.           |
| `requestTimeout`   | 30 seconds  | HTTP request timeout.             |
| `tokenRefreshSkew` | 60 seconds  | Refresh JWT before actual expiry. |
| `userAgent`        | SDK default | HTTP `User-Agent` header.         |

## Next steps

* Follow the [Starter Guide](/en/sdk/java/starter-guide).
* See [Messages](/en/sdk/java/messages) for send methods.
* See [Realtime](/en/sdk/java/realtime) for WebSocket subscriptions.
