---
title: "Get the deployment Web Push VAPID public key"
---

> Documentation Index
> Fetch the complete documentation index at: https://tryshiba.dev/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Shiba public API › notifications

`GET /notifications/webpush-key`

## Authentication

Requires one of the following:

- `bearerAuth`, http, header `Authorization`, format `API key`
- `cookieAuth`, apiKey, in cookie

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/notifications/webpush-key' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/notifications/webpush-key';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/notifications/webpush-key"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Success

#### Example

```json
{
  "ok": true,
  "publicKey": "string"
}
```

- `ok` (`getWebPushPublicKey.response.200.ok`; boolean, required)
- `publicKey` (`getWebPushPublicKey.response.200.publicKey`; string, required) — Base64url uncompressed P-256 VAPID public key. Public by design; never a private key.

### 401

Unauthorized

#### Example

```json
{
  "ok": false,
  "error": "string",
  "detail": "string",
  "code": "string"
}
```

- `error` (`getWebPushPublicKey.response.401.error`; string, required)
- `ok` (`getWebPushPublicKey.response.401.ok`; boolean, optional)
- `detail` (`getWebPushPublicKey.response.401.detail`; string, optional)
- `code` (`getWebPushPublicKey.response.401.code`; string, optional)

### 503

Web Push is not configured

#### Example

```json
{
  "ok": false,
  "error": "string",
  "detail": "string",
  "code": "string"
}
```

- `error` (`getWebPushPublicKey.response.503.error`; string, required)
- `ok` (`getWebPushPublicKey.response.503.ok`; boolean, optional)
- `detail` (`getWebPushPublicKey.response.503.detail`; string, optional)
- `code` (`getWebPushPublicKey.response.503.code`; string, optional)


Source: https://tryshiba.dev/reference/api/notifications/getWebPushPublicKey/index.md
