# Access Accounts in Near

User accounts are used in a variety of contexts in NEAR, including as identifiers and for signing transactions. Once login successfully, you'll be able to access to the `accountId` and `account` instance. &#x20;

### Current Account ID

You can get the logged in account ID via the `getAccountId()` method in **Near** chain

```javascript
// For version 1.11.7 and below
const accountId = window.near.getAccountId();

// For version 2.0.0 and above
const accountId = window.sender.near.getAccountId();
```

### Use Account Instance in Near Chain

***\[Work In-Progress]*** You can also get access to the current account, and use its interface directly. The account is an instance of the `account` object in [near-api-js](http://github.com/near/near-api-js) . The usage can be found in the [documentation here](https://docs.near.org/docs/api/naj-quick-reference#account).&#x20;

```javascript
const account = window.near.account();
await account.sendMoney(
  "receiver-account.testnet", // receiver account
  "1000000000000000000000000" // amount in yoctoNEAR
);
```


---

# 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://docs.senderwallet.io/guide/access-accounts/access-accounts-in-near.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.
