Find and Use the right API keys
Configure your testing and production environments with the proper Leanplum keys.
Within your team in Leanplum will be Leanplum Apps which are the instance of your app within Leanplum. Each Leanplum app created will include an App Key, Production key and a Development key. Each of these keys (production/development) connect to a specific pipeline on the backend of Leanplum. It will be key to understand the differences between each pipeline to get the most out of your integration
Finding Your Keys
First, however, it is important to find where to find those keys in Leanplum! To quickly find your keys, visit the App Settings page .
Otherwise, you can find your API keys via the following steps:
- Navigate to Development -> App Settings
- Click on "API Keys"
Using The Correct Keys
Now that you have found your keys, you will need to use the correct key depending on the phase of your development cycle you are in. While you are testing your Leanplum integration, you can easily switch between the development and production pipeline by running a build of your app with either the development or production API key in place.
Two Different Leanplum Apps
You may notice two different Leanplum apps on your App Settings page, one for development and one for production. To reduce the risk of using the wrong key in your development cycle, we have created two apps for you. We would recommend in while you are in your development phase, using the API keys from the development version of your Leanplum App. Once you are ready to go-live, switch over to the API and production key from the production LP app
Development Key Features vs Production key features
Development Mode: for testing 👩🔬
Most of your team's testing will be done in Development mode. Development mode sends user data to Leanplum in real time, allowing your team to preview events, messages, and other Leanplum content immediately.
The Development key is used to:
- Use specific API methods that work only with the development key for increased security
- Send data to the development/test pipeline (via an open web socket in real-time)
- Log processes in the debugger for validation
- See and register your test devices in the dashboard
- Force your device into specific A/B test variants
- Keep your test data separate from the live users (instead it will show up in the Developer Activity section)
- Update custom templates and variables to the content management system
Development mode keeps your team's user activity out of Analytics. This allows you to try things out in Leanplum without worrying about polluting your actual user data in Analytics. You can view your team's testing activity in the "Developer Activity" section of analytics.
Development Key Usage
Never use a development key in a production/live build of your app. Our development key uses an open socket (for real-time analytics), which could noticeably degrade your app's performance. Additionally, any user data will be lost as it is not captured in analytics.
Production Mode: for your live app 📲
The Production key is designed to handle real users in production. Leanplum processes data from production mode in batches for efficiency.
Production mode is best for:
- Releasing an update of your app to the app store
- Tracking real user activity in Analytics when your app is live and in production
Updated almost 3 years ago