App Store Connect API JWT Generator.
Sign an ES256 JWT for the App Store Connect API or App Store Server API with your .p8 key, in the browser.
Runs in your browserAbout App Store Connect API JWT Generator
Every call to the App Store Connect API and the App Store Server API needs a short-lived JSON Web Token in the Authorization header, signed with ES256 using the private key you downloaded from App Store Connect as AuthKey_KEYID.p8. Writing that token by hand is where most people get stuck: the header needs alg ES256, your key ID as kid and typ JWT; the payload needs your issuer ID as iss, iat and exp in seconds, and aud set to appstoreconnect-v1. This generator fills all of that in and signs the token in your browser with WebCrypto. Pick the API, paste the issuer ID, key ID and the contents of the .p8 file, and you get a token ready for curl or Postman, the decoded header and payload, the issue and expiry times, and a sample request. For the App Store Server API it adds the bid claim with your bundle ID; for individual keys it uses sub = user instead of an issuer. Typical mistakes it prevents: setting exp more than 20 minutes ahead (60 for the Server API), which Apple answers with 401 NOT_AUTHORIZED; using milliseconds instead of seconds; and producing a DER-encoded ECDSA signature, which some crypto libraries do by default but JWS forbids. Here the signature is the raw 64-byte r||s value, and the token is verified against the public half of your key before it is shown. The private key is never uploaded, stored or put in the page URL, but treat the page like any place you paste a secret and close it when done.
How to Use
- Choose the API and key type, then enter your issuer ID, key ID and (for the Server API) bundle ID.
- Paste the full contents of your AuthKey_XXXXXXXXXX.p8 file.
- Copy the JWT and send it as "Authorization: Bearer <token>" before it expires.
Frequently Asked Questions
Is my private key sent to your server?
No. The token is signed in your browser with the WebCrypto API. The page makes no network requests with your key and does not save it in history or in the URL.
Why does Apple return 401 NOT_AUTHORIZED?
Usually the token expired or exp is too far ahead (over 20 minutes for App Store Connect, 60 for the App Store Server API), the key ID and issuer ID do not belong together, or the key was revoked. Generate a fresh token and check the IDs in Users and Access → Integrations.
What is the scope field for?
App Store Connect tokens can optionally be limited to specific requests, such as "GET /v1/apps?filter[platform]=IOS". Leave it empty for a token that works for every endpoint the key's role allows.
Can I use this token for the App Store Server API?
Yes, choose app-store-server. The token then includes your bundle ID as bid and may live up to 60 minutes. Use a key created under In-App Purchase keys.
Related Tools
Create the ES256 client_secret JWT for Sign in with Apple token requests from your .p8 key.
Decode StoreKit 2 signed transactions, renewal info and AppTransaction JWS, one or many at once.
Decode App Store Server Notifications V2 (signedPayload JWS) with nested transaction and renewal info.
Decode, inspect, and verify JSON Web Tokens.
Encode and decode Base64 strings.
Generate apple-app-site-association and assetlinks.json, and validate the files your domain serves.