Discover AdWords API v201109 - CreateAccountService
This week we released an addition to the v201109 version of the API, enabling one of the most commonly requested uses of the API: account creation. The CreateAccountService creates AdWords accounts without login emails (corresponding to the new optional-login feature available in the AdWords UI).
Let's dive right into some sample code using the Java client library. Notice that the only required parameters are currency, time zone, and descriptive name:
We have a new Java client library available that includes CreateAccountService functionality and example code, and over the next few weeks we’ll be publishing updated libraries in other languages as well.
I hope this blog post will help you use this new feature effectively. As usual, If you have any questions about the AdWords API, check out our developer forum or ask us during our Google+ Hangout Office Hours.
Sample request
// Get the CreateAccountService.
CreateAccountServiceInterface createAccountService =
user.getService(AdWordsService.V201109.CREATE_ACCOUNT_SERVICE);
Account account = new Account();
account.setCurrencyCode("EUR");
account.setDateTimeZone("Europe/London");
CreateAccountOperation operation = new CreateAccountOperation();
operation.setDescriptiveName("Account Created with CAS");
operation.setOperand(account);
operation.setOperator(Operator.ADD);
CreateAccountOperation[] operations =
new CreateAccountOperation[] {operation};
Account[] accounts = createAccountService.mutate(operations);
Notes
Client libraries