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.

The resource has not been reviewed by Editors yet. Readers are advised to use their best judgement before accessing this resource.
This resource will be reviewed shortly.
If you think this resource contain inappropriate content, please report to webmaster.
Are you excited about the 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.



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.



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.


Related Articles

Google released AdSense Management APIs

have you been looking for ways to find out how to programmatically retrieve your revenue report or find other information from your AdSense account? Here is the good news for you.

More articles: AdSense Management APIs AdSense APIs AdSense API Tutorials

Comments

Guest Author: Syed A14 Nov 2011

When I received an email from Google related to Google AdSense Management APIs - I was really unaware how to proceed with this. Thanks for this wonderful article where I came to know all the steps for how to proceed with this. This article helps me a lot like spoon feeding.

Syed A.

Guest Author: Syed A14 Nov 2011

When I received an email from Google related to Google AdSense Management APIs - I was really unaware how to proceed with this. Thanks for this wonderful article where I came to know all the steps for how to proceed with this. This article helps me a lot like spoon feeding.

Syed A.



  • 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:
    Email: