# 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": {}
}
```
