Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Authorized Buyers Ad Exchange API DotNet Samples

These samples demonstrate basic usage of the Authorized Buyers Ad Exchange API.

The Authorized Buyers Ad Exchange API DotNet Client Library makes it easier to write .NET clients to programmatically access Authorized Buyer accounts. The complete documentation for the Authorized Buyers Ad Exchange API docs are available from


  • Support for .NET SDK 4.0 and above.

Announcements and updates

For API and client library updates and news, please follow the Google Ads Developers blog:

For questions and support look at our forum page:!forum/authorized-buyers-api.

Running the examples

Download the repository contents

To download the contents of the repository, you can use the command

git clone

or browse to and download a zip.

Setup Security

The API uses OAuth2 for security, you can read about the options for connecting at

We will focus on using a Service Account; samples are included for prompting the user and using a refresh token

If you don't already have a Service Account and corresponding JSON key file

  • Launch the Google Developers Console
  • Click the API Manager item on the navigation menu.
  • Click Credentials menu option.
  • Click the link titled Manage service accounts.
  • You should now see a table listing the Service Accounts associated with the current project. Find the Service Account you had been using previously, and open the menu.
  • Select the Create key menu item.
  • Click the JSON key type option and click CREATE.
  • Set the path to the downloaded JSON file as the ServiceKeyFilePath value in ExamplesConfig.cs.


The DoubleClick Ad Exchange Buyer API .Net Client Library is hosted on

If nuget is configured you can skip to Run the examples and it will automatically download the required libraries

Otherwise you can locate the client library at

Run the examples

When you are ready, hit F5

By default this will print out a usage method and show how to run a paricular example

If you know which example you want to run you may choose to set Project|Properties|Startup Object and then hit F5

Note: Some of the examples need parameters configured for them to work, those parameters appear in the first few lines of the Run method in each case.

You can’t perform that action at this time.