Frequently Asked Questions
This article contains answers to some frequently asked questions about the Bing Ads API.
Q. Where can I get help?
The developer forum provides a way for the developer community to ask and answer questions about developing solutions with Bing Ads APIs, to showcase innovations, and to generate and maintain content through community participation. Microsoft monitors the forums and replies to questions that the community has not yet answered.
If you are not finding the information you need to solve your problem in the developer forum, please contact Bing Ads Support. To resolve the issue efficiently, please provide support with the details requested in Engaging Support.
Q. How can I find out about changes?
Q. What are the requirements to use the Bing Ads API?
Q. Which programming languages and SDKs are supported?
You can develop Bing Ads applications with any programming language that supports web services. The Bing Ads Software Development Kits (SDK) enhance the experience of developing Bing Ads applications with .NET, Java, PHP, and Python languages. Each SDK includes a proxy to all Bing Ads API web services and abstracts low level details of authentication with OAuth. You can use the high level BulkServiceManager and ReportingServiceManager interfaces to abstract and execute operations in the low level Bulk and Reporting services.
We have heard requests for additional SDKs e.g. Perl and Ruby, although there is no plan to add support in the near term.
Q. How can I view code samples in different programming languages?
In addition to the Code Examples and services Reference sections, you'll find code snippets in many of the technical guides e.g., the Get Started guide. You can use the language selector at the top or right of those pages to view examples in CSharp, Java, Php, or Python. When you choose a language, the setting is retained as you navigate other pages. The language selector will only include languages that have samples for that specific page, and will default to C# if the language you had previously set is not available for the page that you navigated to.
Q. Which API version should I use?
Q. How can I view documentation and code examples for different versions of the API?
To navigate between versions, use the version selector near the table of contents at the top and left side of the page.
view query string parameter will be updated and appended to the URL e.g.,
?view=bingads-12. By default when you navigate to a page without any
view query string parameter, the content for the latest generally available version will be shown even when a higher API version is available for preview.
Q. Should I use the Bulk or Campaign Management API?
The Bulk service is recommended, especially if you need to add or update ads and keywords across multiple ad groups or campaigns in an account. Some features are not available in Bulk e.g. AddUetTags, GetBMCStoresByCustomerId, GetGeoLocationsFileUrl, and GetMediaMetaDataByAccountId. For these features of course you must use the Campaign Management service.
Q. Which API performance reports are available and when will my data be available?
The Reporting service supports most of the same report types that you can find in the Bing Ads web application. Be sure to check out the Report Attributes and Performance Statistics and Reporting Data Retention Time Periods guides for availability details.
When a user clicks an ad, it can take up to two hours for the system to process the click (3 hours for conversions) and make it available for reporting. When all data for the previous day have been processed and made available for reporting, this state is referred to as Books Closed. For more information about when the books are closed for reporting, see Determining When the Books Close.
Q. I want to run my application without user interaction. How can I authenticate without getting prompted for permission to use Bing Ads credentials?
To programatically manage a Bing Ads account, you must provide consent at least once through the web application consent flow. For repeat or long term authentication, you should follow the authorization code grant flow for obtaining an access token and refresh token. Thereafter you can use the latest refresh token to request new access and refresh tokens without any further user interaction. You may need to request user consent again for example, if the Microsoft Account owner went through account recovery, changed their password, or otherwise removed permissions for your application to authenticate on their behalf.
Q. When do the access and refresh tokens expire?
The access token typically expires after one hour, although you should always check the expiration time each time you request a new token.
Refresh tokens are, and always will be, completely opaque to your application. They are long-lived e.g., 90 days for public clients, but the app should not be written to expect that a refresh token will last for any period of time. Refresh tokens can be invalidated at any moment, and the only way for an app to know if a refresh token is valid is to attempt to redeem it by making a token request. Even if you continuously refresh the token on the same device with the most recent refresh token, you should expect to start again from Step 1 and request user consent if, for example you signed the user out, the Microsoft Account user changed their password, removed a device from their list of trusted devices, or removed permissions for your application to authenticate on their behalf. At any time without prior warning Microsoft may determine that user consent should again be granted. As a best practice you should always securely store the latest refresh token each time you request new access and refresh tokens.