Skip to content

Test and Live Keys

WhiskrKit has two kinds of API keys. Use a test key while you build and test your integration, and a live key in the version of your app you release. Both keys show the same surveys. Only the data they send is kept apart, so the responses from your simulator never end up next to the responses from your users.

Live keyTest key
Starts withwk_live_wk_test_
Use it inThe version you release in the App Store or Play StoreDebug builds, simulators and CI
Responses are keptYesFor 14 days
Counts toward your planYesNo
Requests per hour1,000100
In the weekly summary emailYesNo
In the dashboardUnder Live, the defaultUnder Test, see Seeing test data

Surveys, targeting and survey priority are shared between the two. When you change a survey, you change it for your live app as well. To try a new survey before your users see it, give it a minimum app version rule for a version you haven’t released yet.

  1. Go to Settings → API keys. Only admins and owners see this tab
  2. Choose Live key or Test key. There is no default, so you always pick on purpose
  3. Give the key a name, for example “Debug builds” or “Release”, and click Create key
  4. Copy the key straight away. You won’t be able to see it again

The key belongs to the app selected in the app switcher. Each app can have two active live keys and two active test keys, so you can replace a key without downtime: create a new one, ship it, then revoke the old one.

Let your build configuration pick the key, so a debug build always uses the test key and a release build always uses the live key.

#if DEBUG
let whiskrKitKey = "wk_test_your_test_key"
#else
let whiskrKitKey = "wk_live_your_live_key"
#endif
WhiskrKit.shared.initialize(apiKey: whiskrKitKey)

Keep your API keys private. Do not commit them to source control.

As soon as an app has a test key, a Live / Test switch appears below the app switcher. On a phone it sits at the top of the screen.

  • Live is the default. You see only the data from live keys.
  • Test shows only the data from test keys. Every page follows it: the dashboard, the survey list, responses, charts, filters and exports. An exported file gets -test in its name.

While you look at test data, a banner at the top of each page reminds you. Click Back to live data in the banner, or use the switch, to go back.

Test data is deleted automatically after 14 days. To start fresh sooner, admins and owners can click Clear test data in the banner. That deletes every test response and test impression of the selected app. It doesn’t touch your live data, your surveys or your keys, and it can’t be undone.

Before WhiskrKit had test and live keys, every key started with wk_test_. Those keys are live keys: their responses count as live data, and nothing changes for apps you have already released. The API keys page lists them under Live keys with a short note.

You don’t need to do anything. If you prefer a key that starts with wk_live_, create a new live key, release your app with it, and then revoke the old one.