Environment Variables

To get your API key and app ID, you must go to the Settings option, and then Keys & IDs.

Settings > Keys & IDs

Environment variables template:

ONESIGNAL_APP_ID=
ONESIGNAL_API_KEY=
ONESIGNAL_ENV=
ONESIGNAL_BASE_URL=
ONESIGNAL_API_VERSION=

Example:

ONESIGNAL_APP_ID=<YourAppID>
ONESIGNAL_API_KEY=<YourApiKey>
ONESIGNAL_ENV=sandbox
ONESIGNAL_BASE_URL=https://onesignal.com
ONESIGNAL_API_VERSION=/api/v1

Last updated

Was this helpful?