Thank you for the information. I'll see if I can find another way to get my API client recognized.
[cc'ing the list] On Sun, Nov 11, 2012 at 5:52 PM, Win Ko Aye <w...@adzcentral.com> wrote: > Hi Micah, > > That's because OAuth2 server doesn't recognize the api client ID you > passed in CampaignService call. You need to get your api client ID > authorized first before using it. As far as I know, Google App console is > the only place you can authorize client service account, as of now. Maybe > they will expose that functionality in the api someway in the future. > > Another method is to use Web Service account that requires user > interaction but doesn't need to use Google App. > > Hope that helps. > > Win Ko > > > > On Sat, Nov 10, 2012 at 4:25 AM, Micah Ransdell <mjr...@gmail.com> wrote: > >> Win Ko Aye, >> >> I am trying to follow your instructions, but I am unable to complete Step >> 2 because we are not using Google Apps for Business. I am able to complete >> the other steps, and when I try to access the CampaignService I receive >> "AuthenticationError.NOT_ADS_USER" when trying to access the campaigns for >> one of the client accounts. >> >> All the messages I can find in this forum revolve around people seeing >> that error in the Sandbox, but this is in Production for me. >> >> Any help is appreciated. >> >> Micah >> >> On Thursday, October 18, 2012 3:10:03 AM UTC-7, Win Ko Aye wrote: >>> >>> Hi, >>> >>> Just sharing my experience with OAuth2 service account. >>> >>> Step 1: Create 'Service Account' in 'API console' >>> >>> - Log in to api console using the email that you used to connect adwords >>> api. The email should be from your domain, for >>> >>> example, adw...@yourdomain.com >>> >>> https://code.google.com/apis/**console/<https://code.google.com/apis/console/> >>> >>> - Create a new project if you havn't done so in the past. >>> - Go to 'API Access' page and 'Create client ID', choose 'Service >>> Account' from the options. >>> - Download private key of the client service account, take note of >>> 'Client ID' and 'Email address'. You'll see >>> something like; >>> >>> Client ID : >>> 123456789012.apps.**googleusercontent.com<http://123456789012.apps.googleusercontent.com> >>> Email address : 123456...@developer.**gserviceaccount.com >>> Public key fingerprints : 123456789abcdef123456789abcdef**123456789a >>> >>> Private key's default filename is like '**123456789abcdef123456789abcdef >>> **123456789a-privatekey.p12' >>> >>> >>> Step 2: Authorize api client in 'Google Apps for Business' >>> >>> - You need domain administrator access to 'Google Apps for Business'. >>> Log in to >>> http://www.google.com/**enterprise/apps/business/<http://www.google.com/enterprise/apps/business/>with >>> domain admin account. >>> >>> - Go to 'Advanced Tools > Manage client API access'. >>> - Enter client ID, from above example that's '123456789012.apps.** >>> googleusercontent.com <http://123456789012.apps.googleusercontent.com>' >>> in 'Client Name' field. >>> - Enter >>> 'https://adwords.google.com/**api/adwords<https://adwords.google.com/api/adwords>' >>> in 'One or More API Scopes' field. >>> - Hit 'Authorize' >>> >>> Here's the page to detail instructions >>> >>> OAuth: Managing API client access >>> http://support.google.com/a/**bin/answer.py?hl=en&answer=**162106<http://support.google.com/a/bin/answer.py?hl=en&answer=162106> >>> >>> >>> Step 3: Coding using java client libraries >>> >>> - I use 'Google API Client Library for Java, version 1.11.0-beta' >>> https://code.google.com/p/**google-api-java-client/** >>> downloads/detail?name=google-**api-java-client-1.11.0-beta.** >>> zip&can=2&q=<https://code.google.com/p/google-api-java-client/downloads/detail?name=google-api-java-client-1.11.0-beta.zip&can=2&q=> >>> >>> >>> - And follow the OAuth2 example from >>> https://code.google.com/p/**google-api-ads-java/source/** >>> browse/examples/adwords_axis/**src/main/java/adwords/axis/** >>> v201209/misc/OAuth2Example.**java<https://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201209/misc/OAuth2Example.java> >>> >>> But replace getOAuth2Credential() with >>> >>> private static Credential getOAuth2Credential() throws Exception { >>> >>> File keyFile = new File("**123456789abcdef123456789abcdef** >>> 123456789a-privatekey.p12"); >>> >>> GoogleCredential serviceAccountCredential = new >>> GoogleCredential.Builder() >>> .setTransport(new NetHttpTransport()) >>> .setJsonFactory(new JacksonFactory()) >>> .setServiceAccountId("12345678**9012@developer.** >>> gserviceaccount.com") >>> .setServiceAccountScopes("http**s://adwords.google.com/api/** >>> adwords <https://adwords.google.com/api/adwords>") >>> .**setServiceAccountPrivateKeyFro**mP12File(keyFile) >>> .setServiceAccountUser("adword**s...@yourdomain.com") >>> .build(); >>> >>> return serviceAccountCredential; >>> } >>> >>> You can ignore CALLBACK_URL, CLIENT_ID and CLIENT_SECRET. They are use >>> for interactive web server application. >>> >>> Check 'ads.properties' file >>> >>> api.adwords.email=adw...@**yourdomain.com >>> api.adwords.password=******* >>> api.adwords.clientCustomerId.**prod=123-456-7890 >>> api.adwords.environment=**production >>> >>> That's it and good luck. >>> >>> Win Ko >>> >>> >>> On Wednesday, October 17, 2012 1:19:55 AM UTC+8, Bobby wrote: >>>> >>>> Specifically, I am trying to run AdHoc reports without any user >>>> interaction. Since it is a new application, it would be desirable to use >>>> the latest technology instead of using something that is already deprecated >>>> (i.e. ClientLogin). Can one of the AdWords moderators please comment? If >>>> this is not possible, please provide an alternate solution that will not >>>> require updating in the near future. Thanks. >>> >>> -- >> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ >> Also find us on our blog and discussion group: >> http://adwordsapi.blogspot.com >> http://groups.google.com/group/adwords-api >> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ >> >> You received this message because you are subscribed to the Google >> Groups "AdWords API Forum" group. >> To post to this group, send email to adwords-api@googlegroups.com >> To unsubscribe from this group, send email to >> adwords-api+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/adwords-api?hl=en >> > > -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en