The Prompted · Meta Ads API Setup
Step 0 / 14
1System User
1 · System User
2 · Create App
3 · Connect App
4 · Ad Account
5 · Generate Token
0
Welcome

Connect Claude to your Meta Ads — the API way

This is the setup that lets you manage your Facebook & Instagram ads directly through Claude Code — checking spend, adjusting budgets, pausing ad sets, pulling performance — without the Meta Ads MCP and without clicking through the Meta UI every time.

It works by generating a Meta Marketing API access token. Once you have that token, you paste it into your Claude Code session and it handles the rest. You own the connection, the context lives on your machine, and nothing runs through a middle-man connector.

  • ⏱ Takes about 10–15 minutes, one time.
  • 🔒 The token is scoped to just your ad account — you control exactly what it can do.
  • 📱 Once it's set up, you can run everything from your phone.

i What you'll need

A Facebook Business account that owns your ad account, with admin access. That's it. Click through one step at a time — click any screenshot to zoom in.

1
Stage 1 · System User

Create the System User

Go to business.facebook.com → Settings → Users → System users. Click Add in the top right.

Name it something you'll recognise — for example API Ads Loader. Set the role to Employee access.

[ screenshot: the "Create system user" dialog — name field + Employee role dropdown ] drop file as: screenshots/01-create-system-user.png

i What's a System User?

It's a non-human user that exists only to issue API tokens. You're creating a dedicated "robot account" whose only job is to hold the credentials Claude will use.

2
Stage 2 · Create App

Open Meta for Developers and create a new App

Head to developers.facebook.com and click Create new app ID (or Create App).

[ screenshot: the "Create new app" / "Create new app ID" button ] drop file as: screenshots/02-create-new-app.png

i Why a separate "App"?

Meta grants API access at the App level, not the business level. The app is the container for the API permissions — and the token you'll generate at the end is bound to that app plus the system user from Step 1.

3
Stage 2 · Create App

Name the App

Give the app a name — API Ads Loader is fine. Add your contact email. Click Next.

[ screenshot: app details screen — app name + contact email ] drop file as: screenshots/03-name-the-app.png
4
Stage 2 · Create App

Pick the use case: "Manage ads with the Marketing API"

On the use-cases screen, choose "Create and manage ads with Marketing API". This is the one that unlocks ad-account access.

[ screenshot: use-cases screen with "Create and manage ads with Marketing API" selected ] drop file as: screenshots/04-use-case-marketing-api.png
5
Stage 2 · Create App

Connect the app to your Business

Pick your Business from the dropdown — the one that owns your ad account. Click Next.

[ screenshot: business-selection dropdown ] drop file as: screenshots/05-connect-to-business.png

! Important

You must attach the app to your Business at this step. If you skip it, the system user from Step 1 won't be able to install the app later, and the token won't have access to ad accounts.

6
Stage 2 · Create App

Confirm requirements and create the App

Meta will show a "Requirements" page. For the Marketing API there are usually no requirements identified — just click Next.

[ screenshot: requirements screen — "no requirements identified" ] drop file as: screenshots/06a-requirements.png

Then on the Overview screen, click Create app.

[ screenshot: overview screen with the "Create app" button ] drop file as: screenshots/06b-create-app.png
7
Stage 3 · Connect App to System User

Switch back to Business Settings and open Apps

Now switch back to business.facebook.com. In the left sidebar under Accounts, click Apps.

[ screenshot: Business Settings → Accounts → Apps in the left sidebar ] drop file as: screenshots/07a-apps-sidebar.png

You should see the app you just created in the list.

[ screenshot: the new app appearing in the Apps list ] drop file as: screenshots/07b-app-in-list.png
8
Stage 3 · Connect App to System User

Click "Assign Access" on the app

Click into the app, then click the Assign Access button.

[ screenshot: the "Assign Access" button on the app page ] drop file as: screenshots/08-assign-access.png
9
Stage 3 · Connect App to System User

Pick the System User and toggle 4 permissions on

In the assignment dialog, select the System User you created in Step 1. Then toggle these 4 app permissions on:

  • ✓ Develop app
  • ✓ View insights
  • ✓ Test app
  • ✓ Manage app
[ screenshot: assignment dialog — system user selected + 4 permissions toggled on ] drop file as: screenshots/09-toggle-app-permissions.png

Click Save changes.

10
Stage 3 · Connect App to System User

Verify the app is installed on the System User

Go back to Users → System users. Click your system user, then open the Installed apps tab. You should see the app listed there with Full control.

[ screenshot: navigating back to Users → System users ] drop file as: screenshots/10a-system-users-nav.png
[ screenshot: Installed apps tab showing the app with Full control ] drop file as: screenshots/10b-installed-apps-tab.png

✓ Checkpoint

If you see your app under Installed apps, the wiring is correct. Move on.

11
Stage 4 · Ad Account Access

Give the System User access to your ad account

Still in Business Settings. In the left sidebar under Accounts, click Ad accounts, then click into the ad account you want Claude to manage.

Click Assign access, then add the System User you created.

[ screenshot: ad account → Assign access → add the system user ] drop file as: screenshots/11-ad-account-assign-access.png
12
Stage 4 · Ad Account Access

Toggle "Manage campaigns (ads)" ON

In the permissions panel, under Partial access, turn Manage campaigns (ads) on. Leave the others off — that's all the token needs.

[ screenshot: "Manage campaigns (ads)" toggled on under Partial access ] drop file as: screenshots/12-manage-campaigns-toggle.png

Click Save changes.

13
Stage 5 · Generate Token

Generate the access token

Back to Users → System users. Click your system user. In the top right, click Generate token.

[ screenshot: the "Generate token" button on the system user page ] drop file as: screenshots/13a-generate-token-button.png

Pick the app you created (the one wired up in Stages 2 and 3).

[ screenshot: select-app modal ] drop file as: screenshots/13b-select-app.png

Set the expiration to 60 days (Meta's recommended option).

[ screenshot: expiration set to 60 days ] drop file as: screenshots/13c-expiration-60-days.png

Select these 4 permissions in the permission picker:

  • ✓ ads_management
  • ✓ ads_read
  • ✓ pages_manage_ads
  • ✓ pages_read_engagement
[ screenshot: permission picker with the 4 checked ] drop file as: screenshots/13d-permission-picker.png

! Heads up on expiration

A 60-day token will stop working after 60 days. When it expires, just come back to this screen and generate a fresh one — same steps, takes a minute.

14
Stage 5 · Generate Token

What happens after you click Generate

Click Generate token. One of two things will happen — and which one depends on how your business is set up:

→ Path A — Token appears immediately (most common)

The screen shows a long string starting with E… (usually EAC or EAA). That's your token. Copy it right away — Meta only shows it once.

Save it somewhere safe and paste it into your Claude Code session when it asks for the Meta access token. That's what unlocks Claude Code to manage your ads without going through the UI.

⚠ Path B — "Someone else needs to approve" warning

If your business has admin gating turned on, you'll see a yellow banner that reads:

"Someone else needs to approve request to generate an access token."

[ screenshot: the yellow approval-pending banner — Path B ] drop file as: screenshots/14-approval-pending.png

If this happens, Meta has already sent the request to another admin in your business. Wait for them to approve, then come back to this same screen — the token will appear. Save it and paste it into Claude Code.

🔐 Keep your token safe

Your access token is like a password for your ad account. Don't paste it into public chats, don't commit it to a repo, and don't share it. If it ever leaks, go back to System users and click Revoke tokens — then generate a new one.

That's it 🎉

Save the token (the long E… string) somewhere safe and paste it into your Claude Code session when it asks. From here on, you can manage your ads — budgets, cost caps, pausing, performance — straight through Claude.