Quick start API guide
Quick start API guide
App ID
All requests require an App ID, which can be found using one of the following ways:
Inspecting the URL of the Dashboard page. For example, you log in to onesignal.com
and click your app to get https://dashboard.onesignal.com/apps/202d4f61-1ca9-
42df-9d36-bb17d8123abc .
The App ID is 202d4f61-1ca9-42df-9d36-bb17d8123abc .
Settings page in the Dashboard. See Keys & IDs.
Inspecting a successful response from a Configuration API.
See Notification Parameters to learn more about this identifier and other notification-
specific parameters.
Key Safety
It's critical to keep your API keys secure. Your App ID is public but REST API Keys enable
you to control almost every aspect of your app, including managing subscriptions,
modifying user data, and sending messages to your users. Good security hygiene can lower
the risks of bad actors accessing your apps.
https://documentation.onesignal.com/reference/quick-start-api-guide 1/3
06/03/2025, 15:09 Quick start API guide
Responding to Incidents
If you suspect your app may have been compromised, generate a new REST API Key as
soon as possible. Doing so will limit the time a bad actor has to carry out malicious activity.
To generate a new key, navigate to Dashboard > Settings > Keys & IDs, then click the
Generate New API Key button. See Account Security for details.
API key
Your app's API key authenticates your requests to send messages, manage users, and more.
Locate or create your app API key by navigating to Dashboard > Settings > Keys & IDs.
Refer to Keys & IDs to learn more.
Authentication
To authenticate your requests, set the Authorization header to the API Key preceded by
the word key .
Example
HTTP
{
"app_id":"202d4f61-1ca9-42df-9d36-bb17d8123abc",
"contents":{"en":"Hello, World","es":"Hola Mundo","fr":"Bonjour le monde","zh-Ha
"target_channel":"push",
"included_segments":["All Subscribers"]
}
https://documentation.onesignal.com/reference/quick-start-api-guide 2/3
06/03/2025, 15:09 Quick start API guide
https://documentation.onesignal.com/reference/quick-start-api-guide 3/3