# Connect Meta Ads (Per-User)

Enable your end users to connect their own Meta Business accounts to your AVCodex agent using per-user OAuth.

---

This integration uses **per-user OAuth**, which is a different model from most integrations. Instead of you connecting one account that the whole agent uses, each end user connects their own Meta Business account. The agent then acts on that user's data, scoped to that user.

That distinction matters. Per-user OAuth is the right model any time your agent serves multiple customers who each have their own account on the downstream service.

## When you would use this

The honest answer for most AV integrators is: rarely. Meta Ads is not part of a typical integration or service workflow.

It becomes relevant in two cases:

- **You run marketing services as a side line**, for example helping AV manufacturers or dealers run campaigns, and you want an agent that reports on performance.
- **You are building a client-facing app on AVCodex for a customer whose business is marketing.** This is an ADaaS custom build scenario rather than an AV support scenario.

If neither applies, skip this integration. It is documented here for completeness.

## Setup

1. Open your app in the builder and go to **Integrations**.
2. Find **Meta Ads** and enable it.
3. Configure the OAuth application credentials. Per-user OAuth requires you to register your own Meta app rather than using a shared client.
4. Set the requested scopes to the minimum your agent needs, typically read-only ads insights.

See [Consumer OAuth for Custom MCP Servers](/docs/guides/consumer-oauth-for-custom-mcp-servers) for the broader per-user OAuth pattern, which applies to any third-party service where each end user has their own account.

## The end-user flow

1. The user asks the agent something that requires their ad data.
2. The agent prompts them to connect their Meta Business account.
3. The user completes OAuth in a browser window.
4. The agent proceeds, scoped to that user's ad accounts only.

Users can disconnect at any time, which revokes the agent's access immediately.

## Cautions

- **Meta app review.** Production use of ads scopes generally requires Meta app review. Budget time for it.
- **Token expiry.** Meta access tokens expire and users will need to reconnect periodically. Make sure your agent handles the reconnect prompt gracefully rather than failing silently.
- **Data sensitivity.** Ad spend and performance data is commercially sensitive. Confirm your agent cannot leak one user's data into another user's session.

*AVCodex · Your AV expertise. Amplified by AI.*
