Store Stats

Setup and security guide

For Store Stats 1.0.1 and later

Store Stats reads your data with an App Store Connect API key. Apple only offers one kind of key: a private key file (AuthKey_XXXXXXXXXX.p8) that signs each request, plus a key ID and an issuer ID that tell Apple which key signed it. There is no simpler token to use instead. This guide shows how to give Store Stats a key that can read your numbers and nothing more, and how to keep it safe.

1. Choose the smallest role that does the job

Every key has a role, and the role decides what the key can do. Store Stats only needs to read.

RoleWhat Store Stats can do with itUse it for
Sales and ReportsRead analytics reports and sales.Everyday use. Recommended.
Customer SupportRead written reviews and reply to them.Add it if you want the Reviews screen.
AdminEverything, including switching on analytics reports.Only once per app, then revoke (step 6).

A Sales and Reports key cannot change your apps, prices, builds, users or bank details, so even if it were ever copied, the worst it allows is reading your numbers.

2. Create the key

  1. Sign in to App Store Connect as the Account Holder or an Admin.
  2. Open Users and Access › Integrations › App Store Connect API and choose Team Keys.
  3. Choose Generate API Key (or the + button), name it Store Stats and select Sales and Reports, plus Customer Support if you want reviews.
  4. Download the key. Apple only lets you download it once, so keep the file until step 4 is done.
  5. Copy the Issuer ID shown above the list of keys, and note the Key ID next to your new key.

3. Find your vendor number (optional)

The vendor number lets Store Stats read sales, proceeds and refunds. It is not a password and cannot be used to sign in. Find it in App Store Connect under Payments and Financial Reports, at the top left. Without it, Store Stats still shows analytics, ratings and reviews.

4. Add the key to Store Stats

  1. Open Store Stats. The setup screen opens the first time; later, use the key button in the toolbar or Store Stats › Settings.
  2. Either choose Choose .p8 File…, which fills in the key ID from the file name, or choose Paste Key… and paste the file's contents (from a password manager, for example), then type the key ID.
  3. Paste the issuer ID and, if you have it, the vendor number.
  4. Choose Test Connection. Store Stats lists the apps the key can see.
  5. Choose Save and Sync.

5. Clear the key file away

Once saved, the key lives in your login Keychain, so the .p8 file is no longer needed. If you chose the file, Store Stats offers Move File to Trash; empty the Trash afterwards. If you want a backup, keep it in a password manager rather than in Downloads or iCloud Drive. If you lose the key you can always create a new one.

6. Switch on analytics reports

Apple only produces analytics reports for an app after an Admin asks for them, once. Apps that still need this have an orange mark in the Store Stats sidebar.

  1. Create a second key with the Admin role, as in step 2.
  2. In Store Stats' setup screen, temporarily switch to the Admin key and save.
  3. For each marked app, open Analytics and choose Request Reports.
  4. Switch back to your Sales and Reports key, then revoke the Admin key in App Store Connect. The reports keep coming without it.

Apple delivers the first data within a day or two, and up to a year of history arrives over the following days.

Where the key is kept, and where it goes

Revoking or replacing a key

Need help?

Email support@velosec.au. Never send your .p8 file or its contents to anyone, including support.