Use the OneSignal API to create a new Rich Authentication Token (App API Key) for a specific app. This guide explains how to authenticate with the Organization API key and configure optional IP allowlists using CIDR notation.
ip_allowlist_mode parameter to explicit and provide a list of allowed IP addresses in the ip_allowlist parameter.
If you want to set the explicit range of IPs that can use this API key, add them by setting ip_allowlist_mode to explicit and in ip_allowlist add the IPs in CIDRs notation as an array of string values.
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
An internal name you set to help organize and track API keys (Rich Authentication Tokens). Maximum 128 characters.
Defaults to disabled, can be set to explicit. If set to explicit, a list of network addresses in the form of CIDRs has to be specified in the ip_allowlist parameter.
disabled, explicit An array of allowed networks in CIDRs notation. Only IPs in those ranges will be permitted to use the API key.
200
The OneSignal-generated ID specific to the API key. This is not the API key itself.
The Rich Authentication Token (REST API Key). It is shown only once and won’t be stored in OneSignal. Keep it secret and secure, as it can’t be retrieved later. See Rotate API Key.