In some cases you may want to safely generate new API keys and change them in your production application.
Procedure
- Generate new "app_" and "prod_" API keys as it is described in the following documentation article:
API Keys Documentation article - Add the new keys in the code of your production application;
- Release a new version of your application;
- Monitor the adoption of this new version. Once the adoption reaches the desired level you can consider deleting the old API keys;
When you delete the old API keys all the data from users who are using the version of the app with the old keys will not be tracked anymore.
This is the reason why it is very important to monitor the adoption of the new version and delete the old keys when none of the users or a very small part of them is using an older version of the application.
If you release a version with brand new API keys and delete the old keys right after the release there will be a data loss for the existing users until they update the application to this new version.