# getAccount

Return the Account that is currently connected to the dApp.

## **Input Arguments**

None

## **Success Response**

<table><thead><tr><th width="334">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>address: string</code></td><td>Address of the connected account</td></tr><tr><td><code>label?: string</code></td><td>A label the users has set to identify their wallet</td></tr><tr><td><code>isLedger: boolean</code></td><td>Whether the connected account is a ledger account</td></tr></tbody></table>

## **Error Response**

<table><thead><tr><th width="340">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>type: string</code></td><td>The type of error which has occured</td></tr><tr><td><code>description: string</code></td><td>A description of the error which has occured</td></tr><tr><td><code>data: string</code></td><td>Any raw data associated with the error</td></tr></tbody></table>

## Example

### Request

```js
neolineN3.getAccount()
.then(account => {
    const {
        address,
        label,
        isLedger
    } = account;

    console.log('Provider address: ' + address);
    console.log('Provider account label (Optional): ' + label);
    console.log('Provider account is ledger account: ' + isLedger);
})
.catch((error) => {
    const {type, description, data} = error;
    switch(type) {
        case 'NO_PROVIDER':
            console.log('No provider available.');
            break;
        case 'CONNECTION_DENIED':
            console.log('The user rejected the request to connect with your dApp');
            break;
        case 'CHAIN_NOT_MATCH':
            console.log('The currently opened chain does not match the type of the call chain, please switch the chain.');
            break;
        default:
            // Not an expected error object.  Just write the error to the console.
            console.error(error);
            break;
    }
});
```

### Response

```js
{
    address: 'NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq',
    label: 'NEOLine',
    isLedger: false
}
```


---

# 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://tutorial.neoline.io/reference/neo3-provider-api-legacy/common-methods/getaccount.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.
