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

# Connect Meta Ads

> Log in with Meta and approve the Consile app. Expect to reconnect about every 60 days. The access can be revoked at any time.

*[Læs siden på dansk](https://docs.consile.ai/connect/forbind-meta-ads.md)*

You connect Meta Ads by logging in with **Meta (Facebook)** and approving the
Consile app for your ad accounts. The result is an access token that Consile
stores encrypted per customer. Your AI never sees the token itself.

> [!NOTE]
>
> Meta Ads must be bought in the [portal](https://app.consile.ai) or be included
> in your plan ([the free edition](https://docs.consile.ai/en/portal/free-edition.md) or
> [the Consile Studio membership](https://docs.consile.ai/en/portal/membership.md)), and your AI must be
> connected ([Claude](https://docs.consile.ai/en/connect/connect-claude.md) or
> [ChatGPT](https://docs.consile.ai/en/connect/connect-chatgpt.md)). You must be able to log in as the Meta
> user that has access to the ad accounts you want to connect. Anyone on the team
> can connect an agreement that is not connected yet. Only an administrator can
> reconnect it or disconnect it.

> [!NOTE]
>
> Meta Ads can both read your ad data and create and manage campaigns. Anything
> that puts something live, changes a budget or archives requires your
> confirmation. See [Actions & guardrails](https://docs.consile.ai/en/essentials/actions-and-guardrails.md)
> before you start using the write functions.

## How to connect

**1. Open the connector in the portal**

Open Meta Ads in the portal. Click **Connect now** at the top of the page, or
**Connect** next to the agreement on the **Connections** card. The portal
calls each connection to the system an agreement. Click **Authorise access**
in the window. You are sent to Meta's own login and approval page.

**2. Log in with Meta**

Log in as the Meta user that manages your ad accounts. Choose the right user
if you have several. The access follows the user you approve with.

**3. Approve all permissions**

Meta shows what the Consile app is asking for access to. Approve all the
permissions to continue. You are then sent back automatically to the portal,
which shows **Meta Ads is connected**.

> [!TIP]
>
> Consile now has access to your ad accounts. The agreement shows as
> **Connected** in the portal, and your AI can read your ad data and manage
> campaigns under guardrails.

**4. Lock the connection to one ad account (optional)**

The page also shows *The key reaches several companies. Choose the one this
connection should be locked to, and every call keeps to it.* If you want your
AI to work in only one ad account on this agreement, click **Choose
company**. Choose the account under *Choose ad account*, and click **Lock to
this company**. This requires an administrator.

If you do not want to lock, click **Go to connector**. Your AI then chooses
the account per request. See
[Lock a connection to one company](https://docs.consile.ai/en/portal/company-lock.md).

## What exactly am I approving?

In one approval step, Consile asks for the whole set of permissions the connector
uses for its three tasks: measuring, creating/managing and fetching leads.

| Permission | What it is used for |
| - | - |
| `ads_read` | Reading statistics and setup on your ad accounts (measurement) |
| `ads_management` | Creating and managing campaigns, ad sets and ads (behind guardrails) |
| `leads_retrieval` | Fetching leads from your Lead Ads forms |
| `pages_show_list`, `pages_read_engagement`, `pages_manage_ads` | The Pages that ads and lead forms are attached to |
| `business_management` | Access to assets in the connected business |

> [!WARNING]
>
> Approve all the permissions in Meta's dialog. If you uncheck even one of them,
> the connection is not completed: the portal shows **Connection was not
> completed** (technical reason `unknown`). Click **Try again** to get back to
> the Meta Ads page, and start over with **Connect now** or **Connect**. If
> Meta's dialog does not ask again for the permission you deselected, remove
> Consile under
> [Business integrations](https://www.facebook.com/settings?tab=business_tools)
> in your Facebook settings and then connect again.

> **Read + manage behind guardrails**
>
> The connector can read your ad data and manage campaigns. Everything new is
> created paused, and anything that spends money, changes a budget or archives
> requires your explicit confirmation; otherwise you only get a preview.

> **Access per account**
>
> The connector sees the ad accounts and Pages that the connected Meta user has
> access to, and that you gave access to in Meta's dialog. Your AI chooses the
> right account per request, unless the connection is locked to one ad account.

> **Encrypted per customer**
>
> The token is stored encrypted with a key that applies only to your own
> account, and is never logged.

> **Your AI never sees it**
>
> Your AI is never given the token itself, only answers to your questions.

## Write functions and guardrails

Meta Ads has **39 tools**: 34 for reading (statistics, campaign structure,
creatives, audiences, leads) and 5 for managing. The five write tools are
`create_campaign`, `create_ad_set`, `create_ad`, `update_status` and
`update_budget`. Your AI calls them as `meta-ads__<tool>` (for example
`meta-ads__create_campaign`).

The safety is built into the connector:

* **New items are created paused by default.** New campaigns, ad sets and ads
  are created as `PAUSED` and spend no money until you ask for it. Creating them
  as `ACTIVE` requires `confirm: true`.
* **Going live, budget and archiving require confirmation.** Activating
  (`ACTIVE`), changing a budget or archiving requires an explicit
  `confirm: true`. Without it, the tool only returns a preview of what it would
  do, and sends nothing to Meta.
* **No deletion.** The Meta connector cannot delete, only archive.

On a connection that is locked to one ad account, `update_status` and
`update_budget` are not available. The same applies to 9 read tools, for example
the ones for leads, Pages and `query`. See
[Lock a connection to one company](https://docs.consile.ai/en/portal/company-lock.md).

Meta Ads does not have the **Read only** level. A user with **All tools** under
**Team** also gets the five write tools. If a user should only read, an
administrator chooses **Custom** and only the read tools. See
[Custom access](https://docs.consile.ai/en/portal/team.md#custom-access). Read the whole model in
[Actions & guardrails](https://docs.consile.ai/en/essentials/actions-and-guardrails.md).

## The access expires, and you reconnect about every 60 days

The access to Meta usually expires after about 60 days. So expect to reconnect
Meta Ads about every 60 days.

> [!WARNING]
>
> When the access has expired, your AI gets a message that Meta Ads must be
> reconnected. If the access has been revoked at Meta, for example because you
> changed your password, the calls can instead fail with the general message
> `Tool invocation failed.` The portal can still show **Connected**, because
> access is stored.

How an administrator reconnects:

* If the agreement says **Access revoked**, click **Reconnect**, and approve all
  the permissions again.
* Otherwise: click the menu (the three dots) next to the agreement on the
  **Connections** card, choose **Disconnect**, and confirm with **Disconnect**.
  This only deletes the stored token at Consile, and the subscription continues.
  Then click **Connect**, and approve all the permissions again.
* You can also ask your AI to reconnect Meta Ads. The connector has the tool
  `connect_account`, which gives a link straight to Meta's approval. The link
  works for 10 minutes, and the new token replaces the old one. Ask in the
  connector that belongs to the agreement (for example `meta-ads-2`), so the link
  connects exactly that agreement.

> [!NOTE]
>
> If the connection is locked to one ad account, the ad account must be chosen
> again every time you have reconnected. After **Reconnect** or a link from your
> AI, Consile refuses all calls on the agreement until an administrator has chosen
> it. If you disconnected first, the lock is gone, and your AI can reach all of
> the user's ad accounts until the account has been chosen again. See
> [After a new connection](https://docs.consile.ai/en/portal/company-lock.md#after-a-new-connection).

## Multiple Meta logins and ad accounts

One agreement covers the ad accounts and Pages that the connected Meta user has
access to. There are two reasons to add another agreement:

* **Another Meta user.** Connect the new agreement with the other user.
* **One ad account per agreement.** Connect the new agreement with the same Meta
  user, and lock each agreement to its own ad account. Then each account has its
  own address in your AI, and your AI only reaches the account the agreement is
  locked to. An ad account can only be locked on one agreement at a time.

How to do it:

1. On the **Connections** card, an administrator clicks **Add agreement (149.50
   kr/mo.)**. The agreement is added to the subscription and charged pro rata for
   the rest of the period.
2. When the new agreement is ready (typically after a few seconds), click
   **Connect** next to it and log in with the Meta user the agreement should use.
3. Each agreement has its own address, for example
   `https://mcp.consile.ai/meta-ads-2/mcp`. Copy it from the card, and add it as a
   separate connector in your AI.

The agreements show as **Agreement 1**, **Agreement 2** and so on. If an agreement
is locked, *Locked to \<ad account>* appears under the name. If you connect
the same Meta user on two agreements without locking them, it does not give access
to more, but you pay for two agreements. Under
[the Consile Studio membership](https://docs.consile.ai/en/portal/membership.md#one-more-agreement-in-a-system)
there is no button to add an agreement. Instead the card says *The membership
covers this system. One more company costs full price under the membership, and we
will set it up for you if you write to us.* See [Pricing](https://docs.consile.ai/en/portal/pricing.md).

## Revoke access

You can remove the access again at any time:

* **In the portal:** an administrator clicks the menu (the three dots) next to the
  agreement on the **Connections** card, chooses **Disconnect** and confirms with
  **Disconnect**. The stored token is then deleted at Consile, and any lock
  disappears. The subscription continues, and the access at Meta is not revoked
  automatically. If you have several agreements, an administrator can also remove
  an agreement entirely with **Remove the agreement**. Its token is then deleted
  too. See [Remove an agreement](https://docs.consile.ai/en/portal/buy-a-connector.md#remove-an-agreement).
* **At Meta:** remove Consile under
  [Business integrations](https://www.facebook.com/settings?tab=business_tools)
  in your Facebook settings. After that, the connector stops working, and you must
  reconnect to use it.

More about data processing in [Security & data](https://docs.consile.ai/en/essentials/security-and-data.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.