> For the complete documentation index, see [llms.txt](https://docs.adena.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adena.app/integrations/establish-connection.md).

# Establish Connection

For a web application to send requests by using functions available on Adena, it must **establish a connection with the account** with the `AddEstablish`  method. Once the user approves the connection, the domain will be added to a locally-stored whitelist.

The application will encounter Error 1000 if it attempts to use a function without having established a connection.

#### Code

```javascript
adena.AddEstablish("name")
```

#### **Params**

<table><thead><tr><th width="173">Key</th><th width="149.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>sting</code></td><td>The name of the website requesting to connect</td></tr></tbody></table>

#### Response

<table><thead><tr><th width="173">Key</th><th width="168.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>code</code></td><td><code>number</code></td><td>Numeric result code</td></tr><tr><td><code>status</code></td><td><code>string</code></td><td>Returns <code>success</code> or <code>failure</code></td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>Response type</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>Descriptive message of the result</td></tr><tr><td><code>data</code></td><td><code>object</code></td><td>-</td></tr></tbody></table>

#### Sample Request

```javascript
//the name string will be displayed on the connection pop-up
adena.AddEstablish("adena")
```

#### Sample Response

```json
{
    "code": 0,
    "status": "success",
    "type": "CONNECTION_SUCCESS",
    "message": "The connection has been successfully established.",
    "data": {}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.adena.app/integrations/establish-connection.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.
