Skip to content

How-to

Creating an App Store Connect API key for pricing

Any tool that changes prices on your behalf — your own script or RepriceCat — authenticates with an App Store Connect API key. Here is how to make one that can do the job, and nothing more than the job.

Updated 7 min read

The short answer

In App Store Connect, go to Users and Access → Integrations → App Store Connect API → Team Keys and generate a key with the App Manager role (or Admin if you also want sales reports). Download the .p8 file — you only get one chance — and copy the Key ID and the Issuer ID. Those three values are the credential.

Create the key, step by step

Apple’s steps (Apple: creating API keys) need an Admin account; if the API has never been used on your team, the Account Holder first has to request access to it.

  1. Sign in to App Store Connect, open Users and Access and select the Integrations tab.
  2. Select App Store Connect API in the left column and make sure the Team Keys tab is selected.
  3. Click Generate API Key, or the add button (+).
  4. Enter a name you will recognise later, for example “Pricing — RepriceCat”. The name is for your reference only.
  5. Under Access, choose the role (see the table below), then click Generate.
  6. Click Download API Key next to the new key. The private key downloads once as a .p8 file, typically named like AuthKey_2X9R4HXF34.p8; Apple does not keep a copy, and the link disappears after you download it.
  7. Copy the Key ID from the Active keys list, and the Issuer ID shown near the top of the page.
ValueLooks likeWhere to find it
Issuer IDA UUID, e.g. 57246542-96fe-1a63-e053-0824d011072aTop of the App Store Connect API page; the same for every team key
Key ID10 characters, e.g. 2X9R4HXF34Next to the key in the Active list
Private keyA .p8 text file starting with -----BEGIN PRIVATE KEY-----Your download; it cannot be downloaded again

The examples are Apple’s own sample values from its token documentation.

Which role should the key have?

A team key’s role decides what it can do, and team keys can access all apps regardless of role. Apple’s pricing help pages list Account Holder, Admin or App Manager as the required role for changing app, in-app purchase and subscription prices (Apple: set a price, Apple: role permissions).

RoleCan change pricesSales and Trends reportsUse it for pricing?
App ManagerYesNot described by Apple for this roleYes — the smallest role that manages pricing
AdminYesYesYes, if the same key should also read sales reports
FinanceNoYesNo — reports only
SalesNoYesNo — reports only
Developer, Marketing, Customer SupportNoNot described by AppleNo

Admin keys are powerful — Apple notes they can create and delete users — so use App Manager unless you need sales data from the same key. Reading sales by country is covered in the vendor number and sales reports guide.

Team keys vs individual keys

App Store Connect offers both. Use a team key for pricing:

  • Team keys have an explicit role and survive the person who created them leaving the team.
  • Individual keys carry the access and roles of one user, and are generated from that user’s profile — only if an Admin has granted the Generate Individual API Keys permission.
  • Individual keys cannot use Sales and Finance endpoints, provisioning or notarytool, so they are no good for sales reports.

Test the key before you rely on it

  1. Sign a JWT: header alg ES256 and kid = Key ID; payload iss = Issuer ID, iat = now, exp = no more than 20 minutes later, aud = appstoreconnect-v1.
  2. Call GET https://api.appstoreconnect.apple.com/v1/apps with the token as a bearer header. A list of your apps means the key works.
  3. A 401 usually means a wrong Issuer ID or Key ID, a token signed with a different key, or a token whose lifetime is too long or already expired (check your clock).
  4. A 403 on a pricing call usually means the key’s role cannot manage prices — use a key with the App Manager or Admin role.

Once it works, the pricing API guide walks through the price-point and schedule endpoints.

Storing it safely

  • Treat the .p8 like a password. Anyone with it and the two IDs can act with the key’s role on every app of the team.
  • Apple’s advice: don’t share keys, store them in a code repository or include them in client-side code.
  • Keep one key per purpose. A pricing key does not need to be the key your CI uses for uploads, so each can be revoked without breaking the other.
  • If you paste it into a tool, check what the tool does with it. RepriceCat encrypts the key with AES-256-GCM before storing it, never sends it back to the browser, and uses it only to sign short-lived tokens for your own account.

Common mistakes

  • Choosing Developer or Marketing because it “sounds safer”. The key then reads data but every price change fails.
  • Creating an individual key from your profile and later wondering why sales reports are refused — individual keys cannot use Sales and Finance endpoints.
  • Mixing up the Key ID and the Issuer ID. The Key ID is short and goes in the token header as kid; the Issuer ID is a long UUID and goes in the payload as iss.
  • Signing tokens that live longer than 20 minutes. Apple rejects them for pricing endpoints; a long job should sign a fresh token periodically and reuse each one until it expires.
  • Committing the .p8 file to a repository, even a private one. Move it to a secret store and revoke the exposed key.
  • Sharing one key between your CI uploads, a pricing script and a third-party tool. When you revoke it for one reason, everything else breaks too.

Deciding whether to write your own pricing script with this key or use a tool? RepriceCat vs API scripts lays out the trade-offs.

Revoking it

Revoke a key when someone leaves, when it may have leaked, or when you stop using a tool. An Admin can revoke team keys from the API keys list in Users and Access (Apple: revoking API keys). Revocation is permanent: a revoked key cannot be reinstated, every token signed with it stops working, and it stays listed under Revoked for 30 days. If you lose the .p8, revoke the key and generate a new one.

Using the key with RepriceCat

Connecting RepriceCat takes the Issuer ID, the Key ID and the .p8 file of a team key with the App Manager or Admin role. From then on:

  • The key is encrypted at rest and can be revoked by you at any time in App Store Connect.
  • Nothing is sent to Apple until you approve a review of every product and country; a dry run sends nothing.
  • The Sales page additionally needs your vendor number and a key with the Admin, Finance or Sales role — so an Admin key covers pricing and sales in one.

Ready? Connect a key and reprice your first app — the first month is free, then $1 per app per month.

Frequently asked

Where do I find the Issuer ID?

In App Store Connect, under Users and Access, Integrations, App Store Connect API. It is near the top of the page, with a Copy button, and it is the same for every team key on the account.

I lost the .p8 file. Can I download it again?

No. Apple lets you download the private key once and does not keep a copy. Revoke the key and generate a new one.

Which App Store Connect role can change prices?

Admin and App Manager, as well as the Account Holder. App Manager is the smallest role that manages pricing; Developer, Marketing, Finance and Sales cannot.

Who can create an App Store Connect API key?

Team keys are generated by someone with an Admin account, after the Account Holder has requested API access for the team. Individual keys are generated from a user’s own profile if an Admin has granted that permission.

Can I use an individual API key for pricing?

It works for prices if the user’s own role allows pricing, but a team key is the better choice: it has an explicit role and survives the user leaving. Individual keys also cannot access Sales and Finance reports.

Is it safe to give a pricing tool my API key?

Only if you trust how it stores the key, because the key can do everything its role allows. Use a dedicated team key with the smallest role that works, and revoke it when you stop using the tool.

Try it

Reprice every territory from one base price

Tiers, price-point snapping, one review table, one confirmation — through the App Store Connect API. First month free, then $1 per app per month.