Create API key
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.
post/apps/{app_id}/auth/tokens
Request
- Base URLhttps://api.onesignal.com
- URLhttps://api.onesignal.com/apps/{app_id}/auth/tokens
- Authnone required
Path parameters
app_idstring required
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Headers
Content-Typestring required
Authorizationstring required
Your Organization API key with prefix Key . See Keys & IDs.
Request body
Response
The newly created API key token. token_id and formatted_token are populated. formatted_token is the secret and is returned only in this response. Store it now, or rotate the key later.
Changes
No recorded changes to this operation across all 2 revisions of this API.