> For the complete documentation index, see [llms.txt](https://docs.leather.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leather.io/developers/methods/open.md).

# open

Programmatically open Leather

## Method name

`open`

The app must be connected first, through [`getAddresses`](/developers/methods/getaddresses.md). For an origin that never connected, Leather answers with error `16`, "Permission denied, user must first connect to the wallet".

## Parameters

| Parameter | Description                                                                                               | Required | Type     |
| --------- | --------------------------------------------------------------------------------------------------------- | -------- | -------- |
| `mode`    | `popup` opens the wallet in a popup window. `fullpage` opens it in a new browser tab. Defaults to `popup` | ❌        | `string` |

## Example request

```typescript
await window.LeatherProvider?.request("open", { mode: "fullpage" });
```

## Example response

```json
{
    "jsonrpc": "2.0",
    "id": "5b0b3c41-8a6e-4f0e-9d0a-1f6e2c7a9b11",
    "result": {
        "success": true
    }
}
```

Leather sends the response as soon as it asks the browser for the window. It does not wait for the window to open.

## Sandbox

[Install the Leather extension](https://chromewebstore.google.com/detail/leather/ldinpeekobnhjjdofggfgjlcehhmanlj) then try out this method below:

{% embed url="<https://codesandbox.io/p/sandbox/open-8gkkvv>" %}

## Preview

<figure><img src="https://2085786563-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41U87FfDFo2dIKYr0ZNX%2Fuploads%2FjEw8VjRxpFLXULYydwv9%2FSCR-20240828-ljhu.png?alt=media&amp;token=68ae00fd-afd3-4ca8-8bda-2825896799ab" alt=""><figcaption></figcaption></figure>
