Blog Setup & tools

Issuer ID, Key ID and the .p8 File: What Each One Means

A clear explanation of the three parts of an App Store Connect API key, how they work together, and how to fix the most common errors.

App Store Connect API keys come in three parts, and every tool that uses them asks for all three. If you've ever stared at the fields wondering which ID goes where, you're in the right place.

Let's go through each piece, what it does, and how to fix things when Apple says your credentials are invalid.

The quick version

  • Issuer ID says who you are as a team.
  • Key ID says which key you're using.
  • .p8 file proves you really own that key.

A tool combines all three to create a short-lived token for every request. Apple checks the token, sees it was signed by the right private key for the right team, and sends back your data.

Issuer ID

The Issuer ID identifies your App Store Connect team. Every key on your team shares the same Issuer ID.

You'll find it on the Team Keys page (Users and Access, then Integrations, then App Store Connect API). It sits above the table of active keys. It's long and looks something like a UUID: letters and numbers in groups separated by hyphens.

Common mistake: pasting your Team ID instead. Your Team ID is 10 characters with no hyphens. If what you pasted doesn't have hyphens, it's probably not your Issuer ID.

Key ID

The Key ID identifies one specific key. If you've created several keys over time, each one has its own Key ID.

It shows up in the Key ID column of the keys table, and it's also part of the name of the .p8 file Apple gives you. The file will be named something like AuthKey_ABC123DEFG.p8, where ABC123DEFG is the Key ID.

That file name trick is the easiest way to match the right Key ID to the right file. Just look at the name.

The .p8 file

The .p8 file is your private key. It's a small text file, and it's the only part of the trio that's truly secret. Anyone who has your Issuer ID, Key ID and .p8 file can make API requests with whatever access that key has.

Apple lets you download it once, right after you create the key. That's it. If you lose it, there's no way to get it back. You revoke the old key and create a new one.

How they work together

Here's what happens behind the scenes when a tool fetches your sales:

  1. The tool builds a small token that says "I'm this Key ID from this Issuer ID, and this request is good for a few minutes."
  2. It signs that token with the .p8 private key.
  3. It sends the request to Apple with the token attached.
  4. Apple looks up the public half of your key, checks the signature, and checks that the key's role allows this request.
  5. If everything matches, Apple sends back the report.

The token expires quickly, so even if someone intercepted one, it would be useless within minutes. That's one of the reasons API keys are safer than sharing a password.

Fixing "invalid credentials"

When Apple rejects a connection, it's almost always one of these:

  1. The Key ID and the .p8 don't match. Compare the Key ID you pasted with the one in the file name.
  2. The Issuer ID is wrong. Copy it again from the Team Keys page. Make sure you didn't grab a Team ID or an app ID.
  3. The key was revoked. Check that it's still listed under Active.
  4. It's an individual key. Individual keys can't read sales reports. Create a Team Key instead.
  5. The file got changed. Opening a .p8 in some text editors can add stray characters. Use the original file Apple gave you.

If you're using AppScope, the app tests the connection with Apple before it saves anything, so you'll see right away if one of these is the problem.

Where should the .p8 live?

Somewhere private and backed up. A password manager with file attachments is ideal. The Files app on iPhone, inside iCloud Drive, also works for most people. What you don't want is the key sitting in your Downloads folder, in an email, or in a code repository.

AppScope stores the key in the iOS Keychain on your device, the same secure storage your iPhone uses for passwords. We cover more good habits in keeping your App Store Connect API key safe.

You're ready

Once you understand these three pieces, App Store Connect integrations stop being scary. Add your Vendor Number and you've got everything you need to connect AppScope and see your downloads, revenue and payouts on your phone.

Keep reading