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.
Overview
Use this API to rotate a Rich Authentication Token (App API Key) for a specific OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch.
For background on different OneSignal API keys, see Keys & IDs.
How to use this API
Using your Organization API key (available in Organizations > Keys & IDs) you can rotate an app token associated with a given app.
The token_id
is a OneSignal-generated ID specific for 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.
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.
Response
200
The response is of type object
.