> For the complete documentation index, see [llms.txt](https://docs.senderwallet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.senderwallet.io/guide/sign-in-applications/sign-in-applications-in-near.md).

# Sign in Applications in Near

Once you have Sender installed, you'll be able to sign in and interact with the applications in Near chain.

### Sign In

To interact with smart contracts, users need to sign in the application and request one function call key for the contract. Once sign in, the application will be authorized to call the change methods defined in the scope. &#x20;

```javascript
// Sender will show a popup dialog to ask user to authorize your dApp
// This creates an access key that will be stored in Sender's storage
// The access key can then be used to connect to NEAR and sign transactions

await window.near.requestSignIn({
  contractId: "guest-book.testnet", // contract requesting access
});

// Or add `methodNames` if you only allow the key to call some of the methods

await window.near.requestSignIn({
  contractId: "guest-book.testnet", // contract requesting access
  methodNames: ["addMessage"]       // (optional) changed methods the app allowed to use
});

window.near.isSignedIn()   // true
```

### Sign Out

You may want to remove the generated function access key from browser extension storage if you don't want to use the application any more.&#x20;

<pre class="language-javascript"><code class="lang-javascript">// For version 1.11.7 and below
window.near.signOut();    // true
window.near.isSignedIn();   // false
<strong>
</strong><strong>// For version 2.0.0 and above
</strong>window.sender.near.signOut();    // true
window.sender.near.isSignedIn();   // false
</code></pre>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.senderwallet.io/guide/sign-in-applications/sign-in-applications-in-near.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
