Get Started Using Java with Bing Ads Services
To get started developing Bing Ads applications with Java, you can start with the provided examples or follow one of the application walkthroughs for a Web or Desktop application. The examples have been developed with the Bing Ads Java SDK and run with the Eclipse Java EE IDE for Web Developers, Luna Service Release 1 (4.4.1). For Eclipse downloads, see http://www.eclipse.org/downloads/. Your custom configuration may vary.
You will need user credentials with access to Bing Ads either in production or sandbox. For the production environment you will need a production developer token. All sandbox clients can use the universal sandbox developer token i.e., BBD37VB98. For more information, please see Get Started With the Bing Ads API and Sandbox.
To authenticate with a Microsoft Account (email address username) in production, you must also must register an application and get the corresponding client identifier. You also need to take note of the client secret and redirect URI if you are developing a web application. For authentication details, see Authentication With the SDKs.
Install the SDK
When you create a Maven project and include the microsoft.bingads Maven artifact as shown below, additional dependencies are installed automatically. If you are not using a Maven project, you must include the correct version of each dependency. For more information, please see the Walkthrough: Bing Ads Web Application in Java or Walkthrough: Bing Ads Desktop Application in Java application examples.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ... <dependencies> <dependency> <groupId>com.microsoft.bingads</groupId> <artifactId>microsoft.bingads</artifactId> <version>11.5.9</version> </dependency> </dependencies> </project>
Version 11.5.9 is included as an example. For details about the latest SDK dependency version, please see the Bing Ads Java SDK GitHub README.md.
Once you have the Bing Ads Java SDK installed, you can either browse the Bing Ads Code Examples, download the examples from GitHub, or follow one of the application walkthroughs for a Web or Desktop application.