Skip to main content

Create your Meta app

This page walks you through making the Meta app that your personal Meta server signs in with. When you're done, you'll have its App ID and App secret, which the next pages use.

It sounds technical, but it's mostly a form with a few screens. Nothing you do here touches your ads, and the app stays private to you.

Sign in as a Meta developer

  1. Go to developers.facebook.com and log in with the Facebook account that runs your ads.
  2. If you've never been there before, click Get started and follow the steps to register as a developer. Meta may ask you to confirm your email address or phone number. That's normal.

Create the app

  1. Click My Apps at the top, then Create app.
  2. App details: give it a name you'll recognize, such as My book ads, and check the contact email. Click Next.
  3. Use cases: pick Create & manage ads with Marketing API. If you don't see it, choose the Ads and monetization filter on the left. Click Next.

Screenshot: the Use cases screen with Create & manage ads with Marketing API selected Capture the Use cases step of Create app, with Create & manage ads with Marketing API ticked.

  1. Business: choose the business portfolio that owns your ad account. Click Next.
  2. Requirements: read it over and click Next.
  3. Overview: check it and click Go to dashboard. Meta may ask for your Facebook password once more.

Your app is created in Development mode. Leave it that way: only you will use it, and Development mode is all you need.

Copy the App ID and App secret

  1. In your app's left-hand menu, open App settings, then Basic.
  2. Copy the App ID at the top and keep it somewhere handy.
  3. Next to App secret, click Show, enter your Facebook password if asked, and copy it too.

Screenshot: App settings, Basic, with the App ID and the App secret's Show button Capture App settings → Basic with the App ID and the App secret field (hidden, with Show beside it).

The App secret works like a password for your app. Keep it private: don't paste it into a chat, an email or a document you share. If it ever gets out, click Reset next to it to make a new one.

Let the app ask for the right permissions

Your access token can only include permissions your app has. The ad-management ones come with the use case, but check that all of these are there:

  1. In the left-hand menu, open Use cases, and click Customize next to Create & manage ads with Marketing API.
  2. Under Permissions, make sure each of these says Ready for testing (or is added). Click Add next to any that aren't:
    • ads_management
    • ads_read
    • business_management
    • pages_show_list
    • pages_read_engagement
    • pages_manage_ads

public_profile is always included, so you won't need to add it. If a Pages permission isn't listed in this use case, the sign-in will tell you which one is missing (see If something doesn't work below).

Let the sign-in come back to your computer

When you sign in on the next pages, Facebook sends you back to the personal Meta server, which listens on your computer at http://localhost:8080/callback. Tell your app that's allowed:

  1. In the left-hand menu, open Facebook Login for Business (on some apps it's Facebook Login), then Settings.
  2. Make sure Client OAuth login and Web OAuth login are on.
  3. Under Valid OAuth Redirect URIs, add http://localhost:8080/callback.
  4. Click Save changes.

Screenshot: Facebook Login settings with the localhost redirect added Capture the Facebook Login settings page with Client and Web OAuth login on and http://localhost:8080/callback under Valid OAuth Redirect URIs.

That's the app done. Next: Install the personal Meta server.

If something doesn't work

  • You don't see Create & manage ads with Marketing API. Meta sometimes words it a little differently, such as Manage ads using Marketing API. Pick the one about creating and managing ads.
  • Meta won't let you pick a business portfolio. Your Facebook account needs to be an admin of the business portfolio that owns your ad account. Ask whoever set it up to make you one, in Meta Business Suite under Settings → People.
  • Later, the sign-in says "Invalid Scopes" and names a permission. That permission isn't on your app yet. Add it as described above, then sign in again.