> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/linkedin-integration-setup.md).

# LinkedIn Integration Setup

### Getting Started

Use this guide to connect LinkedIn to your BalkanID tenant. You will need credentials from the LinkedIn Developer Portal and access to the Integrations section in BalkanID.

This integration reads the members of your LinkedIn **ad accounts** and the role each member holds on them, so you can review who can manage campaigns, creatives, and billing.

{% hint style="info" %}
LinkedIn access tokens expire 60 days after they are issued. Supply a refresh token if your LinkedIn app is approved for programmatic refresh tokens, and BalkanID will renew the access token automatically. Otherwise the access token must be replaced in BalkanID before it expires, or syncs will begin to fail.
{% endhint %}

#### Requirements:

Before you begin, collect the following values from LinkedIn:

* **Client ID**
* **Client Secret**
* **Refresh Token (leave blank if using an access token)**
* **Access Token (leave blank if using a refresh token)**
* **LinkedIn API Version (e.g. 202608)**

Supply either the access token, or all of the client ID, client secret and refresh token.

### Configure LinkedIn within your BalkanID tenant

1. Sign in to the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps) and open your app, or create a new one and associate it with your organization's LinkedIn Page.
2. On the **Products** tab, request access to the **Advertising API**. LinkedIn must approve this before your app can read ad account data.
3. On the **Auth** tab, copy the **Client ID** and the **Primary Client Secret**.
4. Still under **Auth**, confirm the `r_ads` scope is granted to your app (see [Integration Scopes](#integration-scopes) below), then generate a token for it. Use the Developer Portal's **Token Generator** to issue an access token, or use your app's refresh token if it has been approved for one.
5. Note the API version you want BalkanID to call, in `YYYYMM` form. Leave the default unless LinkedIn has asked you to move to a newer version.
6. In BalkanID, go to **Integrations** and click **Add integration**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FNftxHMIUFDl436Ea6lQF%2Flinkedin-add-integration.png?alt=media" alt="The BalkanID Integrations page with the Add integration button in the top right"><figcaption><p>Integrations</p></figcaption></figure></div>

7. Search for **LinkedIn**, select it, and click **Next**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FJxPo2bbmk87AqvUgQ7hh%2Flinkedin-connect-new-application.png?alt=media" alt="The Connect a new application step with LinkedIn selected"><figcaption><p>Connect a new application</p></figcaption></figure></div>

8. Set the **Primary application owner** and, if you want, a **Description** and **Secondary application owner(s)**.
9. Under **Select Extraction Type**, choose **Direct Configuration** and paste the values you collected from LinkedIn into the corresponding fields, then click **Next.**

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FAhMoxlVyAO09efIacLJX%2Flinkedin-direct-configuration.png?alt=media" alt="The Direct Configuration fields for LinkedIn, with the client ID, client secret, refresh token, access token and API version"><figcaption><p>Direct Configuration</p></figcaption></figure></div>

10. Fill **Optional Configuration**, if required.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FZbipc8nl8LTFl5YsVIaj%2Foptional-configuration.png?alt=media" alt="The Optional Configuration step showing reviewer settings and fulfillment options"><figcaption><p>Optional Configuration</p></figcaption></figure></div>

11. Once you have filled in the information, click **Save**. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the Integrations page. When data is available, the integration Status column will read **Connected** and the integration Message will read **Data available**.

### Integration Scopes

| Read Only Scopes                                                                                                                        | Lifecycle Management Scopes |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| **Advertising (Read)** — `r_ads`, which covers the ad accounts the authorizing member can see and the members and roles on each of them | N/A                         |

The member who authorizes the connection must hold a role on every ad account you want reviewed. Ad accounts they cannot see are not extracted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/linkedin-integration-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
