How to generate new Leanplum API keys and change them on application level without severe data loss

In some cases you may want to safely generate new API keys and change them in your production application.


  1. Generate new "app_" and "prod_" API keys as it is described in the following documentation article:
    API Keys Documentation article
  2. Add the new keys in the code of your production application;
  3. Release a new version of your application;
  4. 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.

Was this article helpful?
Have more questions? Submit a request