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

# Initialization

> Initializing the SimpleCloud Controller API

## Dependencies

Before you can use the Controller API, you need to add our dependencies to your project.

Please refer to following guides, depending on your platform:

* [Velocity](/en/developer/getting-started/velocity)
* [BungeeCord](/en/developer/getting-started/bungeecord)
* [Paper](/en/developer/getting-started/paper)
* [Other](/en/developer/getting-started/other)

## Initialization

After adding the dependencies, you can initialize the Controller API.

### Initialize with Default Configuration

If you are using the Controller API in any platform, we automatically set the secret token with `CONTROLLER_SECRET` environment variable.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val controllerApi = ControllerApi.createCoroutineApi()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    ControllerApi.Future controllerApi = ControllerApi.createFutureApi();
    ```
  </Tab>
</Tabs>

### Connect with Secret Token

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val controllerApi = ControllerApi.createCoroutineApi("your-secret-key")
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    ControllerApi.Future controllerApi = ControllerApi.createFutureApi("your-secret-key");
    ```
  </Tab>
</Tabs>

<Note>
  You can find your secret in `<installation-dir>/components/.secrets/auth.secret`
</Note>

## Best Practices

* **Multiple Instances**: Don't create multiple instances of the Controller API. While it's possible to create multiple instances, we don't recommend it. Just create a single instance and use it everywhere (preferred with dependency injection).
* **Asynchronous Operations**: Use `Coroutines` for asynchronous operations in Kotlin, or `CompletableFuture` for Java. We don't recommend using our API in sync operations.
* **Error Handling**: We don't throw any exceptions, we return `null` or `Future` objects. You should handle errors by yourself.
