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

# Java Quickstart

> Install the Paxos Java SDK and list profiles in the Sandbox.

> [!NOTE]
>
> Beta: we aim to avoid breaking changes, but they may occur before 1.0.

This quickstart installs the Paxos Java SDK and lists the profiles on your Sandbox account. It takes about five minutes.

## ➊ Prerequisites

* Java 11 or later.
* A Paxos [Sandbox account](https://docs.paxos.com/guides/developer/account.md).

## ➋ Install

```xml Maven theme={"theme":{"light":"github-light","dark":"github-dark"}}
<dependency>
  <groupId>com.paxos</groupId>
  <artifactId>paxos-sdk</artifactId>
  <version>0.1.0</version>
</dependency>
```

```groovy Gradle theme={"theme":{"light":"github-light","dark":"github-dark"}}
implementation 'com.paxos:paxos-sdk:0.1.0'
```

Find the latest version on [Maven Central](https://central.sonatype.com/artifact/com.paxos/paxos-sdk).

## ➌ Set up credentials

Create Sandbox API credentials with the `funding:read_profile` scope. See [Configure API Credentials](https://docs.paxos.com/guides/developer/credentials.md).

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
export PAXOS_CLIENT_ID="your_client_id"
export PAXOS_CLIENT_SECRET="your_client_secret"
```

Scopes are required when you construct a client. This quickstart requests `funding:read_profile`, which lets the client list profiles.

## ➍ List your profiles

Save the following as `Quickstart.java` in your project:

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
import java.util.List;
import com.paxos.sdk.*;
import com.paxos.sdk.enums.Scope;
import com.paxos.sdk.models.Profile;

public class Quickstart {
    public static void main(String[] args) {
        try (PaxosClient client = PaxosClient.builder()
                .clientId(System.getenv("PAXOS_CLIENT_ID"))
                .clientSecret(System.getenv("PAXOS_CLIENT_SECRET"))
                .scopes(List.of(Scope.FUNDING_READ_PROFILE))
                .sandbox(true)
                .build()) {
            for (Profile profile : client.profiles().listProfiles()) {
                System.out.printf("Profile: %s (%s)%n",
                        profile.getId(), profile.getNickname());
            }
        } catch (PaxosApiException e) {
            System.err.printf("API error %d: %s (request_id: %s)%n",
                    e.getStatus(), e.getTitle(), e.getRequestId());
            System.exit(1);
        } catch (PaxosException e) {
            System.err.printf("Request failed without an API response: %s%n", e.getMessage());
            System.exit(1);
        }
    }
}
```

Run it from your IDE or build tool, with `PAXOS_CLIENT_ID` and `PAXOS_CLIENT_SECRET` set in the environment.

The output lists each profile's ID and nickname. `listProfiles` returns an iterable that fetches additional pages automatically.

If a call fails, include the request ID when you contact Support.

## Next steps

* Read [Authentication](https://docs.paxos.com/sdks/authentication.md) to learn how credentials and scopes work.
* Explore the [Sandbox](https://docs.paxos.com/guides/developer/sandbox.md) to fund test profiles and simulate flows.
* Browse the [API Reference](https://docs.paxos.com/api-reference) for the endpoints available on each service.

> Questions? Contact [Support](https://support.paxos.com).
