Your App Store Connect API key is a little like a house key. Handy, and you definitely don't want copies floating around. The good news is that keeping it safe takes a few simple habits, not a security degree.
Here's what we recommend to every indie developer.
Give each key only the access it needs
This is the most important rule. When you create a key, you choose a role, and that role is fixed forever. Pick the smallest role that does the job:
- Analytics tools need Sales and Reports, or Finance if you want payouts. That's it.
- Build and upload tools need roles related to app management, not finance.
- Admin should be very rare. Most tools never need it.
A Sales and Reports key can read reports and nothing else. Even if it leaked, nobody could change your apps, prices or store listing with it. That's the kind of safety net you want.
One key per tool
Create a separate key for each service you connect. Name each key after the tool. That way:
- You can see at a glance which tools have access.
- If you stop using a tool, you revoke just its key.
- If one key ever leaks, you know exactly where it came from.
It takes thirty extra seconds and saves a ton of guessing later.
Where to keep the .p8 file
The .p8 is the secret part. Good places to store it:
- A password manager that supports file attachments.
- An encrypted folder or iCloud Drive with your device protected by a passcode and two-factor authentication.
Bad places:
- Your Downloads folder, forgotten.
- Email, Slack or Discord messages.
- A Git repository, even a private one.
- Screenshots or cloud notes shared with others.
If you're a developer, add .p8 to your global gitignore today. It's a five second change that prevents the most common leak.
Be picky about the tools you connect
Before you give any service a key, ask a few questions:
- Where is the key stored? On your device, or on their servers?
- Where do your reports go? Straight to you, or through their backend?
- What role do they ask for? If an analytics tool wants Admin, that's a red flag.
- Do they have a privacy policy that matches what they say?
AppScope keeps your key in the iOS Keychain on your iPhone, and your reports go directly from Apple to your device. The only server feature is the optional Live sale alerts, which uses App Store Server Notifications and never needs your API key. You can read the details on our privacy page.
Rotate keys now and then
There's no strict rule, but creating a fresh key once in a while is good hygiene. It's also smart to do it whenever:
- Someone with access to the .p8 leaves your team.
- You aren't sure where a copy of the file ended up.
- You stop using a tool.
To rotate: create a new key, connect it in the tool, confirm it works, then revoke the old one.
How to revoke a key
- Go to Users and Access, then Integrations, then App Store Connect API.
- Find the key in the Active list.
- Click Revoke.
Revoked keys stop working right away. Any tool using that key will need a new one.
What to do if a key leaks
Don't panic. Do this:
- Revoke the key immediately.
- Check your App Store Connect activity for anything unexpected.
- Create a new key with the same role for the tools you trust.
- Figure out how it leaked so it doesn't happen again.
With a read-only reporting key, the risk is limited to someone seeing your sales numbers. Annoying, but not a disaster. That's exactly why least privilege matters.
The bottom line
Use the smallest role, one key per tool, store the .p8 somewhere private, and revoke keys you don't need. Do that and your API keys will be one of the least stressful parts of running your app business. When you're ready to connect, our setup guide walks you through creating a read-only key for AppScope.