Tag Archives: adsense_api

Accounts.name changes in the AdSense APIs

We recently deprecated the default namespace in the AdSense Management API so now you should show an account picker to your users and add an account ID to all requests.

The Accounts resource offers both a name and an ID but for most accounts these were showing the same string (something like "pub-12345678901234"). To make the process more intuitive for users, we are improving the logic behind the name.

From now on, the account.name property will have the company name or, in its absence, the contact name. If you still want to show the account ID, just use the id field.

This also applies to the Host API, although the default namespace can still be used.

As always, if you have any questions, feel free to drop us a line on our API forums.

Deprecation of the default namespace in the AdSense Management API

TL;DR Projects using the AdSense Management API should now check for accounts with multiple AdSense/AdX accounts and let users pick instead of using the default namespace, as it will be disabled for some accounts.

API users with access to more than one AdSense or AdX accounts will receive an error when using the default namespace due to cases of ambiguity. We expect a very small percentage of users to have this problem, as this functionality is restricted to a limited set of accounts.

To avoid complications, make sure you're not using the default account namespace adclients.list, adunits.getAdCode, etc. and specify an account ID for every call. For that, use accounts.adclients.list, accounts.adunits.getAdCode, etc. You’ll find the whole list of calls in the API reference pages.

The flow you should always use from now on is:
  • Authenticate
  • Call accounts.list
  • Show a publisher account picker if there's more than one account
  • Do the rest of the requests using the account ID
If you have questions about this change or need help with updating your code, please let us know on the AdSense API forum or our Google+ page.