> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/push/integrations/providers/firefox-web.md).

# Firefox Web Push

Connect Firefox Web Push (VAPID web push for Mozilla Firefox) to Push — the form saves, but Norbix cannot send through it yet.

Firefox Web Push delivers notifications to Mozilla Firefox on the desktop and on Android, through the standard web push protocol. The browser subscribes on your website with your **VAPID public key**; Norbix signs each message with the matching **private key**.

{% hint style="warning" %}
Norbix cannot send through Firefox Web Push yet. Cloud shows the form and saves the integration, but **Test integration** and every send answer *Push integration 'FirefoxWebPushIntegration' is not supported*. To try your flows, use [Fake Push (Test Me)](/codemash/cloud/push/integrations/providers/fake.md); for real devices use [APNs](/codemash/cloud/push/integrations/providers/apns.md) or [Firebase](/codemash/cloud/push/integrations/providers/fcm.md). The settings below can already be saved in Cloud or from code.
{% endhint %}

## Get your credentials

1. Make a VAPID key pair once, for example with the `web-push` package: `npx web-push generate-vapid-keys`. It prints a **Public Key** and a **Private Key** (URL-safe base64).
2. Use the same public key in your website's service worker (`pushManager.subscribe({ applicationServerKey })`).
3. Pick a contact for the **VAPID Subject**: an e-mail address as `mailto:push@your-company.com`.

Keep the private key on the server side only; never ship it to the browser. Changing the key pair ends every existing browser subscription.

## Connect it in Cloud

**Where:** Push → Integrations → **Add New Integration** → Firefox Web Push → **Connect** · `/projects/<project>/push/integrations/new/firefox-web`

| Field                    | Required | What it does                                                                       | Example                     |
| ------------------------ | -------- | ---------------------------------------------------------------------------------- | --------------------------- |
| VAPID Public Key         | yes      | The public key your Firefox client subscribes with.                                | `BAhUY_6Wz7Lc33txHfOUQ78l…` |
| VAPID Private Key        | yes      | The matching private key. Encrypted on save and never shown again.                 | `••••••••`                  |
| VAPID Subject (optional) | no       | A contact recorded in the VAPID header. Only an e-mail is accepted, as `mailto:…`. | `mailto:push@acme.example`  |
| Integration Name         | yes      | The name in your integrations list.                                                | `Acme website (Firefox)`    |

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-575c5807a92d148ea2d8efb9271321af010e8bae%2Ffirefox-web-form-1.png?alt=media" alt="New Firefox Web Push Integration form filled with a VAPID public key, the private key hidden, the subject and Integration Name Acme website (Firefox)"><figcaption><p>The filled form (the keys are made up for the docs).</p></figcaption></figure>

Press **Save**. The page turns into **Editing Firefox Web Push integration** with the badges **ENABLED**, **NOT TESTED**, **NOT CONFIRMED**; the private key is not shown again.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-5e2167197f65e575f31c4936b63e92dec8bb1016%2Ffirefox-web-saved-2.png?alt=media" alt="Editing Firefox Web Push integration with the badges ENABLED, NOT TESTED, NOT CONFIRMED and the public key filled"><figcaption><p>After save.</p></figcaption></figure>

## Test and set as default

**Test integration** answers *Push integration 'FirefoxWebPushIntegration' is not supported*, so setting it as default has no use yet. See [Test an integration](/codemash/cloud/push/integrations/test.md) and [Set an integration as default](/codemash/cloud/push/integrations/set-default.md) for the flow.

## Common errors

| Message                                                                  | Cause                                                         | Fix                                                                                                                                                                                                            |
| ------------------------------------------------------------------------ | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Push integration 'FirefoxWebPushIntegration' is not supported            | Every send or test today.                                     | Use [Fake Push (Test Me)](/codemash/cloud/push/integrations/providers/fake.md), [APNs](/codemash/cloud/push/integrations/providers/apns.md) or [Firebase](/codemash/cloud/push/integrations/providers/fcm.md). |
| Property Subject creation failed … is invalid (`CM-ERRORS-PROPERTY-002`) | A subject that is not an e-mail, e.g. `https://acme.example`. | Use `mailto:you@your-company.com`, or leave it empty.                                                                                                                                                          |
| Required                                                                 | An empty field — on edit also the private key.                | Fill every field, type the private key again.                                                                                                                                                                  |
