> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appstack.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Apple

With the Apple Ads integration, you can import all your ad campaigns and metrics via the Apple Ads API.

<Note>
  **To successfully connect Apple Ads, you must:**

  1. Have an Apple Ads API account with one of these roles: API Account Manager, API Account Read Only, Limited Access API Read & Write, or API Read Only
  2. Ensure your Apple Ads account has access to the app used within Appstack
</Note>

## Connect to Apple Ads

<Steps>
  <Step title="Invite the user with API Account Manager access">
    In your Apple Ads account, follow these steps:

    1. Go to **Account Settings** > **User Management**.
    2. Click **Invite Users**.
    3. Fill in account information.
    4. Assign the **API Account Manager** role.
    5. Send invite.

    <video src="https://mintcdn.com/appstack-23e005aa/hcUUNpIBZtScP3cG/Videos/apple-ads-1.mp4?fit=max&auto=format&n=hcUUNpIBZtScP3cG&q=85&s=66f9ad86feafdb217b75575c599ac1b0" controls={true} data-path="Videos/apple-ads-1.mp4" />
  </Step>

  <Step title="Paste the Appstack public key">
    Using the user with API Account Manager access, copy the dedicated Appstack Public Key you will :

    1. In Appstack, from the side menu, select **Integrations** > **Apple Ads** > **Setup guide.**
    2. Look for the designated public key (in step 2):
       ```text theme={null}
       -----BEGIN PUBLIC KEY-----
       MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcopQgAEgVn6XPywgAgZ6veyGwJ7/Gkj6oRB
       oVH/8tOTT6u6tmQ8ca+5gvFe1p+DuRxuf4uULTmchIDRyxGIDKnSlEpE5A==
       -----END PUBLIC KEY-----
       ```
    3. Go to **Account Settings** > **API.**
    4. Paste the **Public Key** you copied.
    5. Look for the **Client ID**, **Team ID**, and **Key ID**.

    <video src="https://mintcdn.com/appstack-23e005aa/hcUUNpIBZtScP3cG/Videos/apple-ads-2.mp4?fit=max&auto=format&n=hcUUNpIBZtScP3cG&q=85&s=35f2febe11f2b2657c86e95333d284df" controls={true} data-path="Videos/apple-ads-2.mp4" />
  </Step>

  <Step title="Copy and paste the credentials">
    Paste all the requested credentials to start the connection process.

    1. Paste the **Client ID**, **Team ID**, and **Key ID**.
    2. To find the **Apple Ads Campaign Group ID,** click your app name at the top left; a drop-down menu will appear, showing the name and ID of your campaign group.
    3. Copy and paste the Apple Ads Campaign Group ID.
    4. Click on **Connect**.
  </Step>
</Steps>

## Troubleshooting

### **General tips**

1. Make sure you have the right access (API Account Manager). Having Admin access won't work
2. Ensure your Apple Ads account has access to the app used within Appstack
3. When saving API credentials in Apple Ads, you may need to use the Safari browser if you encounter any 'invalid key' errors
4. Contact support: If issues persist, reach out to our support team with specific error messages at [support@appstack.tech](mailto:support@appstack.tech).

### Error messages

| Error                  | How to fix                                                                                                                                                                                                                                                                                              |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Authentication failed  | 1. Verify your Client ID, Team ID, Key ID, and Account ID are correct.<br />2. Ensure your API key is active and not expired.<br />3. Check that your account has the required API role: \*\*API Account Manager.<br />4. \*\*Ensure your Apple Ads account has access to the app used within Appstack. |
| No campaign data found | 1. Verify the app ID is correct in Apple Ads.<br />2. Ensure the app has campaign data over the last 30 days.<br />3. Check that campaigns are active and running.<br />4. Verify your Apple Ads account has access to this app.                                                                        |
