# Auxvyn.init()

### Syntax

```lua
Auxvyn.init(apiKey: string)
```

***

### Parameters

| Parameter | Type   | Required   | Description            |
| --------- | ------ | ---------- | ---------------------- |
| `apiKey`  | string | <h3>✓</h3> | Your workspace API key |

***

### Example

```lua
local Auxvyn = require(game.ServerScriptService.Auxvyn)
Auxvyn.init("auxvyn_your_key_here")
```

{% hint style="info" %}
When you install Auxvyn using the plugin, this is already handled for you in the generated script. You do not need to call this manually.
{% endhint %}

***

### What It Does

When you call `Auxvyn.init()`:

1. Your API key is stored internally in the module
2. `Auxvyn.ping()` is called automatically to verify the connection
3. Your workspace ID is retrieved and stored for use by Live Sync
4. A confirmation is printed to the output window:

{% hint style="success" %}
\[Auxvyn] Connected. Workspace: My Game Plan: free
{% endhint %}

***

### Errors

If `init()` fails you will see a warning in the output:

{% hint style="warning" %}
\[Auxvyn] Request failed: ...
{% endhint %}

Common causes:

* HTTP Requests are not enabled: go to **File → Game Settings → Security → Enable HTTP Requests**
* The API key is invalid or has been revoked

***

### Important Notes

* Always call `Auxvyn.init()` at the top of your server Script before any other Auxvyn calls
* Only call it once per server, calling it multiple times is unnecessary
* Never call it from a LocalScript

***

### What's Next


---

# 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://auxvyn.gitbook.io/auxvyn-docs/module/auxvyn.init.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.
