Skip to main content
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

ResourceVersion
Java11 or higher
Packagecom.vzaps:vzaps-sdk

Install

<dependency>
  <groupId>com.vzaps</groupId>
  <artifactId>vzaps-sdk</artifactId>
  <version>0.1.0</version>
</dependency>
dependencies {
  implementation("com.vzaps:vzaps-sdk:0.1.0")
}

Create the client

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

CredentialWhere to useDescription
clientTokenClient builderAccount client token, also sent as X-Client-Token.
clientSecretClient builderSecret used by the SDK to obtain and refresh JWTs.
instanceTokenEach instance callInstance 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.
String accessToken = client.auth().getAccessToken();

Client options

OptionDefaultUse
connectTimeout10 secondsTCP connection timeout.
requestTimeout30 secondsHTTP request timeout.
tokenRefreshSkew60 secondsRefresh JWT before actual expiry.
userAgentSDK defaultHTTP User-Agent header.

Next steps