> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viral-app.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Notifications

> Push notifications setup

# Push Notifications

The kit includes Expo push notifications.

## Key File

`lib/notifications.ts`

## Request Permission

```typescript theme={null}
import { requestNotificationPermission } from '@/lib/notifications';

const token = await requestNotificationPermission();
```

## Send from Server

```typescript theme={null}
await fetch('https://exp.host/--/api/v2/push/send', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    to: 'ExponentPushToken[xxx]',
    title: 'Hello!',
    body: 'This is a notification',
  }),
});
```

## Local Notifications

```typescript theme={null}
import * as Notifications from 'expo-notifications';

await Notifications.scheduleNotificationAsync({
  content: { title: 'Reminder', body: 'Check the app!' },
  trigger: { seconds: 3600 },
});
```

## Testing

Use [expo.dev/notifications](https://expo.dev/notifications) to test.
