Get Started

To use the server-side API, you need:

If your business has a firewall for outbound requests, see Crawler IPs and User Agents to get Facebook's IP addresses. Be aware that the list of addresses changes often.

Business Manager

You need to have a Business Manager to use the Server-Side API. Business Manager helps advertisers integrate Facebook marketing efforts across their business and with external partners.

If you don't have a Business Manager yet, see the Help Center article on how to Create a Business Manager.

Help Center: About Business Manager

Facebook App

The Server-Side API uses Facebook Marketing API endpoints. To interact with the Marketing API, you need to register a Facebook app. For detailed information about creating a developer account, registering your app, roles, development mode or live mode, see the App Development documentation.

The newly created app should be managed by the business you just created, so you can obtain an access token.

App Review and Required Permissions

Rules around app review and permissions depend on how you are implementing our API:

Type Of ImplementationApp Review And Permissions

Advertisers Directly Implementing Server-Side

In this case, you are an advertiser looking to use server-side to directly send us your events.

If you are implementing server-side directly:

  • Your app does not need to go through app review.
  • You do not need to request any permissions.

Partners Implementing Server-Side As A Platform

In this case, you are a third-party partner offering server-side functionalities for advertisers that use your services.

If you are implementing server-side as a platform:

  • Your app must go through app review.
  • You must request the ads_read permission during app review.
App DevelopmentApp Review ProcessUsing the Marketing APIBest Practices

Facebook Pixel

You need a Facebook pixel to track events on your site. To create one, see Ads Help, Use Facebook Pixel. We recommend that you use the same Facebook pixel for your website and your server-side events.

Help Center: About Facebook Pixel

Server Connection

To create a server-side connection you must be an admin on the Business Manager. Ensure a secure connection by creating an Access Token.

Create Access Token

Both Graph API and Marketing API calls require an access token to be passed as a parameter in each API call. You need a system user to create your access token.

A System User is a Facebook account that can only interact with the system by using API calls. It can have the same permissions as a user within a Business Manager. If you do not have one, learn how to create a System User.

Steps to create access token:

For Server-Side API, we recommend that you create your token using the Business Manager:

  • Visit Business Manager > Events Manager > Pixels
  • For the Facebook Pixel, click Details
  • On the Data Sources panel, click Settings
  • In the Server-Side Events API section, click Manual > Create Access Token
Inside Business Manager, select your Pixel and find Server-Side API for Web. Then, create your access token.
  • Create or use an existing business app
Creating Access Token: select your business app
Creating Access Token: create or select system user
  • Generate a secure access token
Creating Access Token: generate access token