How to use AdSense Management APIs in your website

Are you interested in using AdSense APIs to retrieve and display AdSense reporting information? If you have an AdSense account, you can join the AdSense Management API program and retrieve information programmatically.

Are you excited about the Google AdSense Management API announcement from Google? This announcement came as a surprise to many since this has been a request from many AdSense publishers for a long time and Google always kept their lips closed on this. Read this article to learn more about difference between AdSense Management API and AdSense Host API.

In this step by step tutorial, I will discuss how to use Google AdSense APIs to retrieve Adsense account information.

Step 1: Enable AdSense API Service in your Google Account

If you already have an approved AdSense account, you can that Google account to join the AdSense API program. Visit the Google API Console to apply for AdSense API program.

You may use any Google account to implement AdSense API application and it does not need to be an AdSense account. However, you will need an AdSense account to test the application you developed.

It will show you a welcome screen which you have to click on the button to proceed to the API console screen. After you reach the Console, you will be shown the list of available API services. You can click on the AdSense Management API button to enable it.

You will be taken to a screen and will be asked to agree to "AdSense Management API Terms and Conditions".

After you accept the Terms and Conditions, you will see that the AdSense APIs service is enabled for you.

Adsense Apis

Step 2: Generate an App Key

In the API Console, go to the API Access console. You will see that an App Key is automatically generated for you. This is unique key is required for you to make the API calls and Google will depend on this key to identify who is making the call.

Adsense Apis 2

You may optionally use OAuth 2.0 token for your project, but for this tutorials, we will use the simple App Key. You can create an App Key for your AdSense API project by clicking on the "Generate Key" link.

The above steps conclude the basic configuration required on your Google account to enable your application to start using the AdSense APIs.

In the next steps, I will discuss how to start using the APIs from your code and how to use the retrieved data.

Step 3: Start coding and call the APIs

Once you have the APIs enabled using the previous steps, you can start coding your application and call the AdSense Management APIs.

Before you call any APIs, you must authenticate the call. There are detailed documentation available on the Google website describing how to authenticate a user, get a client Auth token and how to use this token to make further API calls.

There are several client libraries available to make the authentication process easier. Client libraries are available in languages like .NET, Java, Python etc.

Read Difference between AdSense Management API and AdSense Host API

Related Articles

Review of Amobee In-Text Ad program (Kontera)

Are you looking for reviews of Amobee In-Text contextual advertising platform? Kontera ad network is acquired by Amobee and now they are offering their In-Text ad program under the new brand name. Learn more about InContent Ads by Amobee.

What is the highest AdSense CPC?

AdSense publishers are always looking for higher CPC for their Ads. In this post, I will discuss what is the maximum CPC an AdWords advertiser would pay and what is the highest amount AdSense publisher can get per click.

How to keep your Google AdSense Account in good standing

This article gives important guidelines of Google AdSense account. Google strictly monitors the Google AdSense account to check whether user follows the policies and rules or not. This article gives most common violated policies of Google AdSense in simple language to help those who got their Google AdSense approved recently.

More articles: Ad Networks


Guest Author: Raj20 Oct 2017

This tutorial doesn't work any more. OAuth2 is a requirement now.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: