Get Started with the Content API
- A Microsoft account
- A Microsoft Advertising account
- A developer token
To get a Microsoft Advertising account, go to https://ads.microsoft.com. If you're not signed in to your Microsoft account, you're redirected to sign in to your account or to sign up for one. After signing in, you'll have the option to Sign up for a new Microsoft Advertising account. Select the sign up option and click Continue.
Next, if you don't already have a Microsoft Advertising developer token for the production environment, go to the Developer Portal. Click Request Token and provide the requested information. If you use the API to manage your own account, you'll receive your token immediately; however, if you're managing accounts for others, it may take up to five business days to get a token.
Authenticating your credentials
Starting March 1st, 2022 we will require multi-factor authentication for all users who sign in through a third-party application that uses the Bing Ads API, Content API, and Hotel APIs.
You must update your application to get user consent using the new
msads.manage scope. All application developers must take action to use the new scope.
For more information see the Multi-factor authentication requirement guide.
Content API uses the same authentication schemes as Bing Ads API. For details about authenticating Microsoft account credentials with OAuth, see Authentication with the Microsoft identity platform.
You can use the Bing Ads SDK for .NET, Java, or Python to authenticate Microsoft account credentials. For details about using the SDK to get the access token, see C# | Java | Python. For a Content API example that uses the SDK for authentication, see Managing products example.
(Note that the Bing Ads SDK does not provide interfaces for Content API. You should only use the SDK to get the access token if you're using the SDK for Microsoft Advertising campaigns, too. Otherwise, it may not be worth the overhead of installing the SDK.)
If you don't use the Bing Ads SDK for authentication, see Authenticating Microsoft Account Credentials in C# for an example that shows how to use OAuth to authenticate Microsoft account credentials.
Where to use your credentials and developer tokens?
All calls must specify:
- The DeveloperToken header that's set to your developer token.
- The AuthenticationToken header that's set to your access token.
If you manage catalogs on behalf of other customers, you must also set the following headers:
- The CustomerId header that's set to the customer ID of the customer whose store you're managing
- The CustomerAccountId header that's set to the account ID of any of the customer's accounts that you manage (it doesn't matter which managed account).
For information about these and other headers that the request and response may contain, see Headers.
Configuring Microsoft Merchant Center to use the API
For an overview of Microsoft Merchant Center (MMC), see What is Microsoft Merchant Center? The topic includes links to all the Merchant Center topics and related videos.
You must complete the following steps if you haven't already done so.
- Verify and claim your Website's URL To get the webmaster tools mentioned in Verify and claim your Website's URL, see Bing Webmaster Tools. Sign in with the same Microsoft account that you use for Microsoft Advertising. For more information about using the tool, see Verify Ownership of Your Website.
- Create a Microsoft Merchant Center store
- Add a catalog
When you create a MMC store, the process creates a default catalog for you. The store and all catalogs that you create are automatically enabled for API management. The store contains a default catalog that all product operations (add, update, delete, and get) apply to by default. To specify a different catalog, use the bmc-catalog-id query parameter in the resource URL.
In certain circumstances, you can use the API and FTP/SFTP to update a catalog feed. For information about using the API with FTP/SFTP, see Can I Use the API and FTP/SFTP?
Now that you're ready to start using the API, see the following sections.