How to create an App Store Connect API key for your reports
Every tool that reads your sales, subscriptions or proceeds from Apple needs the same four things: an Issuer ID, a Key ID, a private key file (.p8) and, for sales reports, your vendor number. All four come from App Store Connect, and creating them takes about five minutes. This guide walks through each click and explains which role to give the key, so it can read your reports and nothing more than it needs.
What an API key is, and why reports need one
The App Store Connect API is Apple's official way for software to read your account without your password. Instead of signing in as you, a tool signs each request with a private key that you created and that you can revoke at any time.
Apple checks the signature, looks up the role you gave that key, and answers only what that role is allowed to see.
For your numbers this matters twice. First, nobody needs your Apple ID, your password or your two factor codes. Second, a key is scoped: a key with a reporting role cannot submit builds or change your app's page, because that is not what the role is for.
Step by step: creating the key
Sign in to App Store Connect with an account that has the Account Holder or Admin role. Only those two can create team keys.
- Open Users and Access and switch to the Integrations tab.
- Choose App Store Connect API on the left. If you see a Request Access button, the Account Holder has to click it once and accept the terms; after that the page lists your keys.
- Under Team Keys, click the plus button to generate a new key.
- Give it a name you will recognise later, for example the name of the tool that uses it.
- Pick the role under Access. For sales and financial reports, Finance is the role most reporting tools ask for.
- Click Generate. The key appears in the list with its Key ID.
- Click Download next to the new key and save the file called AuthKey_ followed by the Key ID and .p8.
The .p8 file: download it once, keep it safe
Apple lets you download the private key only once. After that the download button is gone, and if the file is lost the only way forward is to revoke the key and create a new one. Put it in your password manager or another safe place the moment it lands in your Downloads folder.
Treat the file like a password. Anyone who has it, together with the Issuer ID and Key ID, can read what the key's role allows. Do not commit it to a repository, do not paste it into a chat, and give it only to tools you trust.
Finding the Issuer ID, the Key ID and the vendor number
The Issuer ID is one ID for your whole team. It is shown above the list of team keys on the same page and looks like a long string of letters and digits separated by dashes. Every key on the team shares it.
The Key ID is the ten character ID of one key. It is in the key list, and it is also part of the file name of the .p8 you downloaded.
The vendor number identifies your account in Apple's sales reports, and the Sales report endpoint needs it. Open Payments and Financial Reports in App Store Connect; the number is shown at the top left, under your account name.
Revoking a key
If you stop using a tool, or think a file has leaked, go back to the same Team Keys list and revoke the key. Revoking takes effect at once and cannot be undone: every tool that used the key stops working, and you create a new key for the tools you still use. Revoking one key does not affect your other keys.
Checklist
- Signed in as Account Holder or Admin
- Team key created with the Finance role
- .p8 file downloaded and stored safely
- Issuer ID and Key ID copied
- Vendor number found under Payments and Financial Reports
- Old keys you no longer use revoked