# Leaked OneSignal API Key? Rotate It Before Pushes

> OneSignal REST API key leaked? Rotate it under Keys & IDs, update your servers and check messages sent since the exposure. Step-by-step guide.

Source: https://leakwatch.net/secrets/onesignal-api-key

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  OneSignal API Key

Messaging · Secret guide

# Leaked OneSignal API Key: what to do in the first hour

Medium severityDetected onlyLast verified November 5, 2026 · 4 min read

A OneSignal REST API key lets a server send push notifications, in-app messages and emails through a OneSignal app, and read information about its subscribers. Whoever holds the key can send messages to every subscriber of the app, which means they can reach your users directly with content of their choice. That is a serious problem for trust and for phishing: a fake notification that looks like it came from your product can send people to a malicious page. Rotate the key quickly, then check what was sent.

[Check your GitHub account for leaked secrets — free](/)

Provider

OneSignal

Severity

Medium

Impact

SaaS account access and billing

Checked live by LeakWatch

No

<!--live-stats-->

**Seen in the wild.** In the 30 days to 11 November 2026, LeakWatch detected 12 exposed OneSignal API Key credentials in public code. These counts cover only what LeakWatch's rules detect. See [live leak trends](/leaks/trends).

<!--/live-stats-->

## What a OneSignal API key looks like

OneSignal REST API keys are shaped like a standard unique identifier: 32 lower-case hexadecimal characters arranged in five groups separated by hyphens. Each app has its own key, and an organization has a separate key that manages apps. The value is often stored in a server configuration next to the app identifier, which is not secret:

```text
ONESIGNAL_REST_API_KEY=<identifier-shaped value, masked as XXXX…>
ONESIGNAL_APP_ID=<app identifier, not secret>
```

The app identifier that sits next to the key is designed to appear in browsers and apps, so it does not need rotating. The REST API key does, because it is what allows sending. OneSignal shows the secret when a key is created or rotated, and does not show it again afterwards, so the value in a file was copied at that moment or from a configuration system.

## How OneSignal API keys get leaked

-   **Server configuration.** A settings file for a web or mobile back end, committed to a repository with the REST key in it.
-   **Mobile app builds.** A REST key compiled into an app, which is then published. The app identifier can be public, but the REST key must stay on a server.
-   **Build pipelines.** A deployment step that writes the key into a file or prints it in the log.
-   **Shared examples.** A request example pasted into a tutorial, a forum or a support ticket, with the real key left in place of the placeholder.
-   **Copied projects.** A template app or a starter kit that still includes the original author’s key.

## What to do in the first hour

1.  **Rotate the key.** Open the OneSignal dashboard, go to Settings, then Keys & IDs, and rotate the REST API key for the affected app. Rotation generates a new secret and keeps the same name and configuration. Do this before you clean the repository, because the old key stops working once you rotate it.
2.  **Update your servers** with the new secret, from a secret store or an environment variable. Send one test message to a test segment to confirm it works.
3.  **Review the messages.** Open the message history for the period since the key may have been exposed. Look for notifications and emails you did not write, for sends at unusual hours and for large sends to all subscribers.
4.  **Check the app settings.** Review the app’s configuration, including the sending settings and any integrations, and look for changes you did not make.
5.  **Check the other secrets** in the same file. Notification setups usually sit beside other push and email credentials, so rotate those as well.
6.  **Clean the repository** after the rotation: remove the value from the files, add the file to `.gitignore` and decide whether to rewrite history. The order of steps is in [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

Not sure what else leaked? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at OneSignal

Open the account settings of your OneSignal dashboard, go to Settings, then Keys & IDs, and rotate the key for the app that leaked. OneSignal’s documentation says that a rotated key keeps its name and configuration, that the new secret is shown only once, and that requests with the old key will fail. The rotate action is also available through OneSignal’s API for App keys, but the organization key can be rotated only in the dashboard. We did not confirm every current label during this review, so check the page when you act.

## How LeakWatch detects it

The rule is called OneSignal API Key. It looks for the word `onesignal` followed, within about 40 characters, by a value that has the identifier shape: eight, four, four, four and twelve lower-case hexadecimal characters separated by hyphens. The match can cross a line break. The app identifier on its own is not a secret and is not reported unless the rule’s shape matches. The severity is **medium**, with the impact class for SaaS services. **This type is not checked live**: LeakWatch does not send the key to OneSignal.

LeakWatch detects this format but does **not** check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

## FAQ

Is the app ID a secret?

No. The app identifier is designed to appear in the browser and in mobile apps. Only the REST API key is a secret, and it is the one to rotate.

Will rotating the key stop my notifications?

Only the sends that use the old key. Update your servers with the new secret right after you rotate, and test a send to confirm.

Can someone send to users without the REST key?

Not through the REST API. The app identifier alone does not allow sending, but the REST key does, so a leaked REST key is the thing to rotate.

## Related

-   [Firebase Cloud Messaging Server Key](/secrets/firebase-cloud-messaging-server-key)
-   [Telegram Bot Token](/secrets/telegram-bot-token)
-   [Discord Bot Token](/secrets/discord-bot-token)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with OneSignal.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
