How to Create an App Store Connect API Key (Issuer ID, Key ID, .p8)

How to Create an App Store Connect API Key (Issuer ID, Key ID, .p8)

Creating an App Store Connect API key is straightforward if you know the three values CI needs: the Issuer ID, the Key ID, and the .p8 private key. This guide shows where to find each value, how to download AuthKey_.p8 once, which role to pick, and how to validate the key in CI so you can upload builds without sharing the Account Holder Apple ID.

How to Publish an App on the App Store in 2026 (Complete Guide) goes deeper on the ideas above and adds concrete next steps.

What three App Store Connect values does CI need and why?

2X9R4HXF34
Key ID (10 chars)
Where to copy this: CI secret / tool credentials
AuthKey 2X9R4HXF34.p8
p8 private key file
Where to copy this: CI secret / tool credentials
a1b2c3d4-e5f6-7890-abcd-ef012345
Issuer ID (UUID)
Where to copy this: CI secret / tool credentials
Early proof: copy these three values (Key ID, .p8 file, Issuer ID) exactly to authenticate App Store Connect API requests.

These three credentials are exactly what App Store Connect clients require to authenticate via JWT. Copy the Issuer ID (UUID), Key ID (10 characters), and the .p8 private key file into CI secrets so EAS, fastlane, Bitrise, or similar tools can perform uploads.

  • ISSUER_ID: ISSUER_ID_EXAMPLE (example only) - store as ISSUER_ID in CI.
  • KEY_ID: EXAMPLE_KEYID_XXXX (example only) - store as KEY_ID.
  • PRIVATE_KEY: AuthKey_EXAMPLE_KEYID.p8 (example only) - store file contents in PRIVATE_KEY or APP_STORE_CONNECT_KEY; do not commit.

What this shows: these three values are sufficient for scoped CI access without sharing the Account Holder credential. Practical impact: a single developer can create and test a key in 10-30 minutes, but expect longer if you need Account Holder approvals or coordination across teams.

When you move from outline to execution, Fastlane app publishing reviews helps close common gaps teams hit here.

How do I create the Team Key, download the .p8, and validate it in CI?

  1. 1Sign inLog in to App Store Connect and open your account dashboard.
  2. 2Open Users & AccessNavigate to the users and role management area.
  3. 3Go to IntegrationsSelect the integrations section within Users & Access.
  4. 4Request access if neededIf Team Keys are not available, request the required permissions.
  5. 5Generate Team KeyOpen the Team Keys area and create a new key.
  6. 6Download and copy IDsDownload AuthKey_<KeyID>.p8, then copy the Issuer ID and Key ID for CI validation.
UI flow in App Store Connect to generate a Team Key, download the .p8 file, and capture Issuer ID + Key ID for CI.

Create the Team Key, download the .p8 once, and confirm JWT auth in your CI with a quick test upload.

Prerequisites before you start

  • Sign in with an Apple ID that has Users & Access rights; the Account Holder may need to approve Integrations access. Expect approval delays of a few hours to a couple of days in larger orgs.
  • Pick a role: App Manager is sufficient for uploads and TestFlight; Admin is only needed for certificate or user management.
  • Have your CI secret editor open and planned secret names: ISSUER_ID, KEY_ID, PRIVATE_KEY (or APP_STORE_CONNECT_KEY).

Generate the Team Key in App Store Connect (UI steps)

  1. Sign in to App Store Connect and open Users & Access.
  2. Open Integrations; if missing, click Request Access and wait for Account Holder approval.
  3. Select Team Keys then click Generate.
  4. Name the key (for example, "CI - Bitrise 2026").
  5. Choose App Manager unless you explicitly need Admin.
  6. Click Generate and download AuthKey_.p8 immediately; App Store Connect does not allow another download.

One thing worth noting: the file is available only once, so plan to paste the contents into your secrets vault during creation.

Add credentials to CI and validate (checklist + quick tests)

  1. Add secrets to CI

    Paste ISSUER_ID as the UUID, KEY_ID as the 10-character ID, and PRIVATE_KEY as the exact contents of AuthKey_.p8. If your CI requires base64, store that version.

  2. Run a quick authenticated upload

    Run a single upload or submit job in your tool (fastlane, EAS, Bitrise) to verify authentication. A successful response or a visible TestFlight build confirms configuration.

  3. Validation check

    If you receive 401 NOT_AUTHORIZED, re-check Key ID, Issuer ID, and that the .p8 has no added headers or extra newlines; also verify system time on build machines to avoid JWT time skew.

A complementary angle worth comparing lives in How to Publish an App Built with Xcode Cloud.

How do I avoid mistakes and rotate App Store Connect API keys?

Checklist showing steps to rotate an App Store Connect API key safely and secure storage best practices.

A compact checklist block listing concrete rotation steps: create new key, add to CI (dual keys), run test upload, switch traffic/update jobs, revoke old key; plus storage best-practices: use secrets vault, limit access, log rotations, and store Key ID + Issuer ID in runbook.

The main risks are choosing the wrong role, committing the .p8, or revoking a key before all consumers are updated; follow a parallel-rotation pattern to avoid downtime.

Role selection anti-patterns and the right choice

Do not pick Admin unless the service must manage certificates or users, because Admin increases blast radius if leaked. Choose App Manager for uploads and TestFlight; use Admin only when the service documentation explicitly requires it.

Storage and rotation mistakes (how to rotate without downtime)

  • Never commit AuthKey_.p8 to source; use a secrets vault (GitHub Actions secrets, Bitrise secrets, or HashiCorp Vault) and restrict access to the CI service account.
  • Rotation pattern: create a new key, add it to CI in parallel with the old key, run a test upload, then revoke the old key during a maintenance window. Expect at least 30-60 minutes for coordination and verification in simple setups; plan longer for multiple teams.
  • Runbook note: maintain a short runbook that records Key ID, Issuer ID, vault paths, and rollback steps; updating and testing that runbook will take recurring effort but prevents outages.

Fixes for 401 NOT_AUTHORIZED and propagation delays

  • Allow 5-15 minutes for propagation after creation and check again.
  • Confirm exact matches for ISSUER_ID and KEY_ID and that PRIVATE_KEY is unmodified.
  • Verify ES256 signing, token iat/exp bounds, and accurate system clock on build machines.

For tradeoffs, checklists, and edge cases, Which CI/CD provider is best for mobile apps? rounds out this section.

FAQ

Where do I find the Issuer ID in App Store Connect?
The Issuer ID appears on the Integrations screen above Team Keys as a UUID; copy it exactly into your CI secret named ISSUER_ID.
Can I download the .p8 file again if I lose it?
No. App Store Connect allows a single download of AuthKey_<KeyID>.p8 at creation. If lost, generate a new Team Key and update consumers.
Which role should I choose for fastlane or EAS uploads?
Choose App Manager for typical upload and TestFlight tasks; use Admin only if the service needs certificate or user management and the docs require it.
How do I rotate keys without breaking CI?
Create a new key, add it to CI in parallel, test uploads, then revoke the old key during a maintenance window. Maintain a runbook and expect some coordination time when multiple teams or environments are involved.