SOP: Connect a Meta Ads Account to Claude via Meta Developer App and ENV File Objective
This SOP explains how to create and configure a Meta developer app, generate the required API token, and securely connect a Meta Ads account to Claude Code using an ENV file. The goal is to enable Claude to read account data and manage ads while keeping credentials out of chat.
Key Steps
1. Create a new Meta developer app 0:13
  • Go to developers.facebook.com and sign in with the same Facebook account used for Business Manager / Ads Manager.
  • Navigate to My Apps and select Create App.
  • Enter an app name and continue.
  • Choose the use case Create and manage ads with the Marketing API.
  • Select the correct Business Manager / business portfolio linked to the ad account.
  • Review the app details and click Create App.
  • Complete any login verification prompts if requested.
2. Add required app settings and publish the app 1:30
  • Open App Settings in the Meta app dashboard.
  • Add a valid Privacy Policy URL from your website.
  • Add a valid Terms of Service URL from your website.
  • Ensure both fields are filled in; they cannot be blank.
  • Click Save Changes.
  • Click Publish to make the app live.
3. Generate the Meta Ads API token and permissions 2:46
  • Go to Use Cases and open the Create and manage ads API section.
  • Click Tools.
  • Locate the API token area and select all required permission checkboxes.
  • Confirm that the selected permissions allow Claude to manage ads.
  • Copy the generated API token and store it securely for later use.
4. Open Claude Code and request an ENV file 3:34
  • Open Claude Code and start the workflow for connecting your Meta Ads account.
  • Ask Claude to create an ENV file for credentials.
  • Use the ENV file instead of pasting API keys directly into chat.
  • Confirm that the file is created and open it when prompted.
5. Add Meta credentials to the ENV file 4:56
  • In the ENV file, add the following credentials:
  • Meta Ads Account ID
  • Meta App ID
  • Meta App Secret
  • Meta Access Token
  • Return to the Meta app dashboard if needed to retrieve the App ID and App Secret from Settings > Basic.
  • Copy each value carefully and paste it into the matching ENV field.
  • Save the ENV file after all credentials are entered.
6. Save the file and connect Claude to Meta Ads 6:11
  • Use the file menu or save command to ensure the ENV file is fully saved.
  • Return to Claude and confirm that the credentials have been saved.
  • Ask Claude to connect to the Meta Ads account.
  • Wait for Claude to verify the token and account permissions.
  • Confirm that the connection is successful and that Claude can read account data such as spend, balance, campaigns, and time zone.
7. Set a safety rule before allowing changes 7:21
  • After the connection is live, instruct Claude not to make any changes without approval.
  • Add a rule such as: Never make a change without my approval.
  • Use this safeguard before allowing Claude to manage campaigns or modify account settings.
  • Treat the connected account as active and capable of making real changes.
Cautionary Notes
  • Use the same Facebook account that has access to the correct Business Manager / Ads Manager.
  • Do not paste API keys directly into chat; store them in an ENV file instead.
  • Privacy Policy and Terms of Service URLs are required and cannot be empty.
  • Make sure you are using Claude Code as shown in the process.
  • The connected Claude instance can make real changes to your Meta Ads account, so use caution.
  • Verify that the Business Manager / portfolio selected during app creation matches the ad account you want to connect.
Tips for Efficiency
  • Prepare your Privacy Policy and Terms of Service URLs before starting.
  • Keep the App ID, App Secret, Access Token, and Account ID in one secure place for quick entry.
  • Double-check each credential before saving the ENV file to avoid connection errors.
  • Use a clear naming convention for the Meta app so it is easy to identify later.
  • Add a strict approval rule in Claude before enabling any ad management actions.
1
1 comment
Adrian Bluhmky
1
SOP: Connect a Meta Ads Account to Claude via Meta Developer App and ENV File Objective
powered by
AI-First Business Builder
skool.com/ai-first-business-builder-9143
💰🚀 Build a business that runs itself. Profitably. AI-first business building. I'm Adrian aka Ads Daddy 💰 US$25M+ spent · 📈 $500k/mo live
Build your own community
Bring people together around your passion and get paid.
Powered by