> For the complete documentation index, see [llms.txt](/llms.txt).

- Snap
- Restricted

# snap_notify

Display a [notification](https://metamask-docs-git-imp-agt-scr-90-100-consensys-ddffed67.vercel.app/snaps/features/notifications/) in MetaMask or natively in the OS. Snaps can trigger a short (up to 80 characters) notification message for actionable or time sensitive information. `inApp` notifications can also include an optional [expanded view](https://metamask-docs-git-imp-agt-scr-90-100-consensys-ddffed67.vercel.app/snaps/features/notifications/#expanded-view). The expanded view has a title, content, and optional footer link shown when a user clicks on the notification.

## Parameters[​](#parameters "Direct link to Parameters")

union

An object containing the parameters for the `snap_notify` method.

### Options

object

required

### type

"native"

required

The literal string "native" to indicate that this is a native OS notification. We recommend using `inApp` instead, as native notifications may be rate-limited by the operating system.

or

object

required

### type

"inApp"

required

The literal string "inApp" to indicate that this is an in-app notification displayed in the MetaMask UI.

or

object

required

### type

"inApp"

required

The literal string "inApp" to indicate that this is an in-app notification displayed in the MetaMask UI.

### content

JSXElement

required

The custom UI content to display when the notification is expanded.

### title

string

required

The title of the expanded notification.

### footerLink

object

An optional link to display in the footer of the expanded notification.

### href

string

required

The URL to navigate to when the link is clicked.

### text

string

required

The link text to display.

### Common properties

### message

string

required

The message to display in the notification.

## Returns[​](#returns "Direct link to Returns")

null

This method does not return any data, so the result is always `null`.

## Examples

### Basic in app notification

- Manifest
- Usage

```
{
  "initialPermissions": {
    "snap_notify": {}
  }
}

```

```
snap.request({
  method: 'snap_notify',
  params: {
    type: 'inApp',
    message: 'This is an in-app notification',
  },
})

```

### Expandable in app notification

- Manifest
- Usage

```
{
  "initialPermissions": {
    "snap_notify": {}
  }
}

```

```
snap.request({
  method: 'snap_notify',
  params: {
    type: 'inApp',
    message: 'This is an in-app notification',
    title: 'Notification Title',
    content: (
      <Box>
        <Text>This is the expanded content of the notification.</Text>
      </Box>
    ),
    footerLink: {
      href: 'https://example.com',
      text: 'Click here for more info',
    },
  },
})

```

### Native notification

- Manifest
- Usage

```
{
  "initialPermissions": {
    "snap_notify": {}
  }
}

```

```
snap.request({
  method: 'snap_notify',
  params: {
    type: 'native',
    message: 'This is a native notification',
  },
})

```
