# How to use the API

## Introduction

GroupSecurity API can be used to login players and hopefully in the future to add more ways to log people in.

## Add dependency

{% tabs %}
{% tab title="maven" %}

<pre class="language-xml"><code class="lang-xml">&#x3C;repositories>
	&#x3C;repository>
		&#x3C;id>mikart&#x3C;/id>
		&#x3C;url>&#x3C;/url>
	&#x3C;/repository>
&#x3C;/repositories>
&#x3C;dependencies>
	&#x3C;dependency>
	  &#x3C;groupId>eu.mikart.groupsecurity&#x3C;/groupId>
	  &#x3C;artifactId>GroupSecurity-<a data-footnote-ref href="#user-content-fn-1">PLATFORM</a>&#x3C;/artifactId>
	  &#x3C;version><a data-footnote-ref href="#user-content-fn-2">VERSION</a>&#x3C;/version>
	&#x3C;/dependency>
&#x3C;/dependencies>
</code></pre>

{% endtab %}

{% tab title="gradle" %}

<pre class="language-gradle"><code class="lang-gradle">allprojects {
	repositories {
		...
		maven { url '' }
	}
}
dependencies {
	implementation 'eu.mikart.groupsecurity:GroupSecurity-<a data-footnote-ref href="#user-content-fn-1">PLATFORM</a>:<a data-footnote-ref href="#user-content-fn-2">VERSION</a>'
}
</code></pre>

{% endtab %}
{% endtabs %}

### Spigot & Paper

{% tabs %}
{% tab title="spigot" %}
Make GroupSecurity load before your plugin inside the plugin.yml like this:

```yaml
softdepend: [GroupSecurity]
```

{% endtab %}

{% tab title="paper" %}
Make GroupSecurity load before your plugin inside the plugin.yml like this:

```yaml
dependencies:
    server:
        GroupSecurity:
            load: BEFORE
```

{% endtab %}
{% endtabs %}

## What's next?

[Making an addon](/api/tutorial.md)

[^1]: spigot\
    velocity\
    bungeecord

[^2]: e.g. 1.0.0-SNAPSHOT


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://groupsecurity.mikart.eu/api/how-to-use-the-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
