Rotate API key
Rotate an existing App API Key (Rich Authentication Token) for a OneSignal app. Useful when a token is compromised or needs replacement without creating a new key from scratch.
Request
- Base URLhttps://api.onesignal.com
- URLhttps://api.onesignal.com/apps/{app_id}/auth/tokens/{token_id}/rotate
- Authnone required
Path parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
The OneSignal-generated ID specific to the API key. This is not the API key itself. It is returned when creating an API key with Create API key. It can be found in the OneSignal dashboard and in the response body of the View API keys request.
Headers
Your Organization API key with prefix Key . See Keys & IDs.
Response
The rotated key's new secret. Only formatted_token is populated; everything else stays the same as before the rotate. Update your integration with the new secret immediately.
Changes
No recorded changes to this operation across all 2 revisions of this API.