> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/a/apple-app-store-connect.md).

# Apple App Store Connect

App Store Connect is the Apple portal for managing apps and the people who work on them. OctoXLabs reads the users of the team.

## Use cases

* Find Apple App Store Connect accounts that have no match in your directory.

```
Adapters = apple-app-store-connect AND NOT Adapters = active-directory
```

* Check what one Apple App Store Connect connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                                                  | Port | Protocol                                 |
| ------------------- | ------------------------------------------------------------ | ---- | ---------------------------------------- |
| OctoXLabs connector | api.appstoreconnect.apple.com (default, configurable Domain) | 443  | HTTPS, or HTTP when Is Secure is cleared |

### Required permissions

A Team API key or an Individual API key can be used. Required roles are not documented in the source. Not verified.

## Create credentials in Apple App Store Connect

{% stepper %}
{% step %}

### Team API key: find the Key ID

Log in to App Store Connect and open **Users and Access**. Select the **Integrations** tab. Hover next to a Key ID under **Active** and click **Copy Key ID**.
{% endstep %}

{% step %}

### Individual API key: generate the key

Open your **User Profile**, scroll to **Individual API Key** and click **Generate API Key**. Copy the Key ID shown.
{% endstep %}

{% step %}

### Download the private key

Go to **Users and Access** > **Keys** and create a new API key. Download the `.p8` file and keep the whole content.
{% endstep %}

{% step %}

### Find the Issuer ID (Team keys only)

Open **Users and Access** > **Integrations**. The Issuer ID is at the top of the page.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter   | Required | Type    | Default                       | Description                                                                                                                 |
| ----------- | -------- | ------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Domain      | Yes      | String  | api.appstoreconnect.apple.com | Domain of the App Store Connect API.                                                                                        |
| Key ID      | Yes      | String  | None                          | Key ID, for example `2X9R4HXF34`.                                                                                           |
| Private Key | Yes      | String  | None                          | Entire content of the `.p8` file.                                                                                           |
| Issuer ID   | No       | String  | None                          | Issuer ID, for example `57246542-96fe-1a63-e053-0824d011072a`. Required for Team API keys. Leave empty for Individual keys. |
| Proxy       | No       | String  | None                          | Proxy address. The connector sends requests through `http://<value>`.                                                       |
| Is Secure   | No       | Boolean | True                          | Use HTTPS. Clear it to use HTTP.                                                                                            |
| Timeout     | No       | Integer | 30                            | Time in seconds to wait for API responses.                                                                                  |

## Troubleshooting

| Error message                                                          | Cause                                                                  | Fix                                                                                                                                           |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Request failed after 5 retries for url                                 | The API kept answering 401 or 429.                                     | Check the Key ID, Issuer ID and private key. Wait if you are rate limited.                                                                    |
| Invalid JSON response while fetching request variables (status=`)`     | The API did not return JSON.                                           | Check the domain and the key.                                                                                                                 |
| Status Code: `, followed by the URL, the method and the response body` | The API answered with a status other than the one the adapter expects. | Read the code and body. 401 or 403 usually points to wrong credentials or missing permissions. Check the address, port and Is Secure setting. |

## Change history

{% hint style="info" %}
Available starting from version 6.3.2.
{% endhint %}
