To connect Dock with your app on App Store Connect, you’ll need two important elements:

1. An API Team Key file (AuthKey)
2. The Issuer ID

This guide will show you exactly how to obtain and configure them correctly.

## How to Get the API Key (AuthKey)

The API Key is a security file that allows Dock to communicate with App Store Connect on your behalf. Here’s how to generate it:

### Step 1: Log in to App Store Connect

1. Go to [App Store Connect](https://appstoreconnect.apple.com/) and sign in with your Apple ID.
2. Make sure you have administrator permissions for the account. Only Account Holders and Admins can generate API Keys.

### Step 2: Access the API Keys

1. From the App Store Connect dashboard, click on **Users and Access** in the top navigation bar.
2. Select the **Integrations** tab in the sidebar menu.
3. If there aren’t active keys, select **Request Access** button.

### Step 3: Generate a New Team Key

1. Click the **+** button (or **Generate API Key**) in the top-left corner of the API Keys section.
2. Enter a descriptive name for your key, such as “Dock Integration.”
3. Select the appropriate access levels:
   - For full Dock functionality, select **Admin Access**.
   - Alternatively, you can select **App Manager Access** for more limited access.
4. Click **Generate**.

### Step 4: Download and Save the API Key

1. **IMPORTANT**: After generating the key, you will have **ONLY ONE OPPORTUNITY** to download the `.p8` file. Make sure to save it in a secure location.
2. Take note of the **Key ID** displayed next to the newly created key. You’ll need it when configuring Dock.

## How to Find the Issuer ID

The Issuer ID is a unique identifier for your App Store Connect account.

### Step 1: In the API Keys Section

1. While still in the **Integrations** tab of the **Users and Access** section, look at the top of the page.
2. You’ll see a section with your **Issuer ID**. It’s an alphanumeric code (e.g., `57246542-96fe-1a63-e053-0824d011072a`).

## Configuration in Dock

Now that you have both the API Key file and the Issuer ID, you can configure Dock:

1. Open your Dock app.
2. Go to the **Settings** > **Accounts** section.
3. Enter the **Issuer ID** in the appropriate field.
4. Upload the **API Key (.p8)** file using the “Browse” button or by dragging it into the designated area.
5. Click **Save Configuration**.

## Troubleshooting Common Issues

### Connection Not Working?

- Verify that the API Key has not expired (they are valid for 1 year)
- Check that you’ve entered the Issuer ID and Key ID correctly
- Make sure the user associated with the API key still has access to the App Store Connect account
- Verify that the network is not blocking connections to App Store Connect

### Lost the API Key File?

If you’ve lost the `.p8` file, you cannot recover it. You’ll need to:

1. Revoke the existing key in App Store Connect
2. Generate a new key by following the steps above again
3. Update the configuration in Dock with the new key

## Security and Best Practices

- Never share your API Key (.p8) file with unauthorized third parties
- Consider rotating API keys periodically (generating new keys and revoking old ones)
- Limit the API key permissions to only what is necessary for Dock
- Regularly monitor API activities in the App Store Connect dashboard

* * *

For further assistance, don’t hesitate to contact our support team at support@dock-app.com or consult [Apple’s official documentation](https://developer.apple.com/documentation/appstoreconnectapi) on App Store Connect APIs.
