How to create an Apple Ads API key: client ID, team ID and key ID
Create an Apple Ads (Apple Search Ads) API key: invite an API user, pick a role, upload the public key and find your client ID, team ID and key ID.
Updated 11 min readView as Markdown
Short answer
To create an Apple Ads API key, an account administrator invites an API user under Account Settings › User Management with an API role, such as API Account Read Only or API Account Manager. The API user activates the invitation, signs in, and pastes a public key under Account Settings › API. Apple then shows the client ID, team ID and key ID. A tool combines them with the matching private key to get one-hour access tokens. The API needs Apple Ads Advanced, and the older Campaign Management API shuts down on January 26, 2027 in favour of the Apple Ads Platform API.
On this page
What an Apple Ads API key is
The Apple Ads API lets software read and manage your Apple Ads campaigns: campaigns, ad groups, keywords, bids, budgets and reports. It doesn't use your Apple Ads password. Instead, an API user in your Apple Ads account gets a key pair:
- The private key stays with whoever calls the API. It signs a short-lived token request and must never be shared.
- The public key goes into Apple Ads, under Account Settings › API. Apple uses it to check those signatures.
Once you save the public key, Apple shows three values: a client ID, a team ID and a key ID. Together with the private key, they're what a tool needs to call the API on your behalf, with exactly the access of that API user's role.
What you need before you start
- An Apple Ads Advanced account. The API is part of Apple Ads Advanced. Apple Ads Basic accounts can't use it.
- An account administrator, to invite the API user. If that's not you, ask whoever manages your Apple Ads account.
- An Apple Account for the API user, with an email address you can read, because the invitation arrives there. We suggest a separate API user for each tool you connect (see why).
Step 1: Choose the API role
The role decides what anyone using the key can do. Apple Ads has four API roles:
| Role | Access |
|---|---|
| API Account Manager | Full read and write access |
| API Account Read Only | Read-only access to all resources |
| Limited Access: API Read & Write | Read and write access to a limited set of resources |
| Limited Access: API Read Only | Read-only access to a limited set of resources |
- Pick API Account Read Only if you only want reporting: dashboards, spend, installs and revenue next to spend.
- Pick API Account Manager if the tool should also make changes, such as creating campaigns, pausing keywords or changing bids.
- The Limited Access roles only reach part of your account, so anything outside that set stays invisible to the tool.
Roles are set in the Apple Ads interface, never through the API. You can change a user's role later, and the key keeps working with the new access.
Step 2: Invite the API user
An account administrator does this in Apple Ads:
- Go to ads.apple.com, choose Sign In › Advanced, and sign in as an account administrator.
- From the Users menu in the top-right corner, select the account you want to give access to.
- Choose Account Settings › User Management.
- Click Invite Users.
- Under User Details, enter the user's first name, last name and Apple Account.
- Under User Access and Role, select one of the API roles from step 1.
- Click Send Invite.
The invited user receives an email with a secure code. They open the secure Apple link in the email, sign in, and enter the code. That activates the API user. Until they've done this, the API user can't sign in to Apple Ads, so there's nowhere to put a public key.
If you have several Apple Ads accounts, invite the same API user from each one you want the tool to reach. One key then covers all of them.
Step 3: Create the key pair
If you're connecting AdsKitty, skip this step. AdsKitty creates the key pair for you, inside a separate key service, and shows you only the public key. The private key never leaves that service, so you never download, store or paste it anywhere.
If you're building your own integration, Apple's documented way is OpenSSL, which is built into macOS and Linux:
# Create an elliptic curve (P-256) private key. Keep this file secret.
openssl ecparam -genkey -name prime256v1 -noout -out private-key.pem
# Extract the public key that goes into Apple Ads.
openssl ec -in private-key.pem -pubout -out public-key.pemOpen public-key.pem in a text editor and copy all of it, including the -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- lines.
Step 4: Upload the public key
Sign in to Apple Ads as the API user, not as the administrator who invited them. Then:
- Choose Account Settings › API.
- Paste the public key into the Public Key field.
- Click Save.
Apple then shows a block of credentials above the field:
clientId SEARCHADS.aeb3ef5f-0c5a-4f2a-99c8-fca83f25a9
teamId SEARCHADS.hgw3ef3p-0w7a-8a2n-77c8-scv83f25a7
keyId a273d0d3-4d9e-458c-a173-0db8619ca7d7These are Apple's example values. The client ID and team ID both start with SEARCHADS., so they're easy to swap by mistake. The key ID has no prefix. You can change the public key later under Account Settings › API › Edit.
Use one API user per tool
Each API user has one public key. Editing it to a new key cuts off anything still using the old one. So if an API user already has a key that some script or tool relies on, invite a new API user for the next tool instead of replacing that key.
Step 5: Connect it
In AdsKitty: open Apple Ads in your workspace, click Create API key, copy the public key it shows into Apple Ads (step 4), then paste the client ID, team ID and key ID back into AdsKitty and click Connect Apple Ads. AdsKitty checks the details with Apple straight away and lists every ad account the key can reach, with whether it can make changes or only read.
In your own code: you exchange the credentials for an access token in two steps.
- Create a client secret. This is a JSON Web Token signed with your private key using
ES256. Its header hasalg: ES256andkidset to your key ID. Its claims aresub(your client ID),iss(your team ID),aud(https://appleid.apple.com),iat(now) andexp, which can be at most 180 days afteriat. - Request an access token from Apple's authorization server:
curl -X POST "https://appleid.apple.com/auth/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=SEARCHADS.your-client-id" \
-d "client_secret=your-signed-jwt" \
-d "scope=searchadsorg"The answer contains an access_token that's valid for one hour (expires_in: 3600). Send it as Authorization: Bearer <access_token> with every API call, and request a new one when it expires. GET https://api.ads.apple.com/v1/acls lists the ad accounts the token can reach, and your role in each.
Which Apple Ads API to use
Apple has two:
- The Apple Ads Platform API (
api.ads.apple.com/v1), version 1.0, released in August 2026. It covers App Store ads and ads on Apple Maps. - The older Apple Ads Campaign Management API (version 5, from the Apple Search Ads days). Apple has deprecated it, and it will be shut down on January 26, 2027.
New integrations should use the Platform API. The key setup above is the same for both: the same API users, roles, key pair and client ID, team ID and key ID. AdsKitty already uses the Platform API.
Common problems
- "Apple rejected these details." The most common causes, in order: the client ID and team ID are swapped; one of the IDs was copied incompletely; the public key was saved while signed in as a different user than the one whose IDs you copied; or the public key was edited later, so the key you're using is no longer the current one. Copy all three values again from Account Settings › API, signed in as the API user.
- "These details work, but they don't give access to any ad accounts." The API user exists, but its role reaches no ad accounts. This happens with a Limited Access role that has nothing assigned, or when the user was removed from the accounts. Check the user's role and accounts under Account Settings › User Management.
- There's no API tab under Account Settings. You're signed in as a user without an API role, usually the administrator. Sign out and sign in as the API user. If the API user can't sign in either, their invitation hasn't been activated yet.
- The invitation email never came. Check spam, and that the administrator typed the API user's Apple Account address exactly. If it's still missing, the administrator can invite the user again.
- Some ad accounts are missing. The API user was only invited from some of your accounts, or has a Limited Access role. Invite them from each missing account, or give them a role with full access.
- AdsKitty shows "Read-only", but you want changes. Change the API user's role to API Account Manager under Account Settings › User Management. The key stays the same, and AdsKitty picks up the new role on its next sync.
- AdsKitty shows "Access lost". The API user was removed, its role no longer reaches that account, or its public key was replaced. Fix it in Apple Ads, or connect a new key in AdsKitty.
Keeping the key safe
- Give the least access that works. Read Only for reporting, API Account Manager only when a tool should make changes.
- Keep one API user per tool, so you can take access away from one tool without touching the others.
- Revoke access in Apple Ads. Remove the API user under Account Settings › User Management, or replace its public key. Either one ends that key's access.
- Never paste a private key into a website or email. A tool that asks for your private key is asking for more than it needs. AdsKitty creates the key pair itself and keeps the private key in an isolated key service, encrypted with its own key, so nobody sees it, you included. Read more on AdsKitty's security.
Frequently asked questions
Where do I find my Apple Ads client ID, team ID and key ID?
Sign in to Apple Ads as the API user and open Account Settings › API. After a public key is saved, Apple shows the client ID, team ID and key ID in a block above the Public Key field. The client ID and team ID start with SEARCHADS..
Can I use the Apple Ads API with Apple Ads Basic?
No. The Apple Ads API works with Apple Ads Advanced accounts only. Apple's setup starts from Sign In › Advanced.
Which role should the API user have?
API Account Read Only if the tool only reads data, such as dashboards and reports. API Account Manager if it should also make changes, such as bids, budgets, keywords and new campaigns. The Limited Access roles only reach part of the account.
How long does an Apple Ads access token last?
One hour. The client secret you sign to request it can be valid for up to 180 days, and you use it to request a new access token whenever the old one expires.
Is the Apple Search Ads Campaign Management API being shut down?
Yes. Apple has deprecated the Apple Ads Campaign Management API (version 5) and will shut it down on January 26, 2027. Its replacement is the Apple Ads Platform API. Keys, roles and IDs are set up the same way for both.
Do I need to write code to connect AdsKitty?
No. AdsKitty creates the key pair, shows you the public key to paste into Apple Ads, and only asks for the client ID, team ID and key ID. It checks them with Apple and lists your ad accounts within seconds.
How do I revoke an Apple Ads API key?
In Apple Ads, remove the API user under Account Settings › User Management, or replace its public key under Account Settings › API › Edit. Either ends access for anything using that key.
Next steps
Once Apple Ads is connected, add your revenue: send Apple Ads attribution data to RevenueCat and connect RevenueCat in AdsKitty, so you see ROAS for every campaign and keyword. Then read how autonomous campaign management looks after your bids every night.