# Accessing the API

## Getting started

In order to use the API you must download and import it into your project. Follow the steps below to do this before moving forward.

{% hint style="info" %}
**Download**

Go to <https://chatsentry.xyz/api-download> to download the API jar

The latest version is 1.1.0, released 1/5/26
{% endhint %}

### **Importing with IntelliJ**

1. Click on **File** -> **Project Structure** (Ctrl + Alt + Shift + S on windows)
2. Go to the **Modules** tab, then to the **Dependencies** subtab
3. Click the **+** on the bottom left side and choose **Library...** -> **Java** (see below image)
4. Choose your downloaded API jar

![](https://1128828529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7WJzX3BgFL2V4BaSof%2F-MZeaxeyMKvvI_vWH46M%2F-MZebxr3rJDeBmRERi3M%2FScreenshot%202021-05-01%20210925.png?alt=media\&token=ca17991c-aeb8-40e5-b2af-b1cb59bc4afb)

### **Importing with Eclipse**

1. Right-click your project and choose **Properties** -> **Java Build Path**
2. Click on **Add external jar** and add your downloaded API jar

## Setting up your plugin

The next step is to go to your **plugin.yml** and add **ChatSentry** as a depend or softdepend, depending on if it is optional or not for your plugin to work

{% hint style="info" %}
**softdepend** is used if your plugin works without ChatSentry installed on the server

**depend** is used if your plugin requires ChatSentry to be installed on the server
{% endhint %}

{% code title="Example plugin.yml" %}

```yaml
name: ACoolPlugin
version: 0.0.1
author: epic-programmer
main: main.path
depend: [ChatSentry]
```

{% endcode %}
