Keys & cryptography

.p8 file (auth key)

A PEM-encoded private key file used for two specific Apple authentication flows: App Store Connect API keys and APNs auth keys. Has no expiration and no companion certificate.

p8 auth keyApp Store Connect API key fileAPNs auth keyAuthKey_*.p8

A .p8 file is just a PEM-encoded ECDSA private key. Apple uses this format for two unrelated authentication flows: App Store Connect API keys (used to script account operations), and APNs auth keys (used to send push notifications via token-based auth). Despite the same file extension, they are not interchangeable.

App Store Connect API key

Created in App Store Connect under Users and Access > Integrations > App Store Connect API. The download gives you a .p8 plus an issuer ID and key ID. The same three values together let a client mint short-lived JSON Web Tokens that authenticate to the App Store Connect API.

The file arrives named AuthKey_<KEYID>.p8, where the key ID is the same ten-character string App Store Connect shows in the table. Keep that name: it is the only place the key ID is recorded once you navigate away, and most tooling parses it straight out of the filename.

Issuer ID
A UUID shown once at the top of the Integrations page, shared across every key in the team. Not in the file.
Key ID
Ten characters, unique per key, shown in the table and embedded in the downloaded filename.
The .p8 itself
The PEM-encoded private key. Downloadable exactly once, at creation.

All three are required. A .p8 on its own authenticates nothing, which is why teams that saved only the file end up revoking the key and starting again.

APNs auth key

Created in the Apple Developer portal under Certificates, Identifiers, Profiles > Keys. A single APNs .p8 can sign push tokens for every app in your team, never expires, and replaces the old per-app push certificate workflow.

How it differs from a .p12

.p12
Certificate plus matching private key, password-encrypted. Used to sign builds.
.p8
Bare private key, no certificate. Used to authenticate API calls (App Store Connect API) or sign short-lived push tokens (APNs).

FAQ

Common questions about .p8 file (auth key)

What is a .p8 file?

A .p8 file is a PEM-encoded ECDSA private key that Apple issues for two token-based authentication flows: App Store Connect API keys, which authenticate scripts and tools against your developer account, and APNs auth keys, which sign the JWTs your backend uses to send push notifications. It is a bare private key, with no certificate and no expiry date, and Apple lets you download it only once.

How do I know which kind of .p8 I have?

The file itself does not say, since both are plain private keys, so go by where it came from. App Store Connect API keys are created under Users and Access > Integrations in App Store Connect and download as AuthKey_XXXXXXXXXX.p8. APNs auth keys are created under Keys in the Apple Developer portal with the APNs service ticked. The two are not interchangeable, and using one where the other is expected fails authentication.

How do I use a .p8 file?

You never send the .p8 itself. Your tool or backend loads the key and uses it to sign a short-lived ES256 JWT, then sends that token in the authorization header. Signing needs three things together: the .p8, its 10-character Key ID, and either your Issuer ID (App Store Connect API) or your Team ID (APNs). Keep all three in the same secret manager entry.

Can I download a .p8 file again?

No. Apple offers the download exactly once, at creation. If the file is lost, revoke that key and create a new one, then update every system that used the old Key ID. This is why the first move after downloading a .p8 should be putting it in a secret manager or vault.

Does a .p8 file expire?

No. Both App Store Connect API keys and APNs auth keys stay valid until you revoke them. That convenience cuts both ways: an unaccounted-for .p8 keeps working forever, so rotate keys when people who handled them leave the team.

What is the difference between a .p8 and a .p12?

A .p12 bundles a certificate with its private key and signs builds. A .p8 is a bare private key with no certificate, used to authenticate API calls to App Store Connect or to sign push tokens for APNs. They are not interchangeable, and neither can be converted into the other.

Can one .p8 serve both the App Store Connect API and push notifications?

No. They are separate key types created in different places: API keys in App Store Connect under Users and Access, APNs keys in the developer portal under Keys. Each signs a different kind of token, and Apple rejects one used in the other's role.

Keep reading

Related terms

Next step

Help articles on this topic

Notice a definition that has drifted? Email support@hexsign.io and we'll update it. Browse the full glossary or jump to the help center.

Try HexSign

Know before a certificate or profile expires.

HexSign tracks every Apple certificate and provisioning profile and alerts you ahead of expiry. The Free plan covers tracking and alerts. Paid plans renew them for you.