I am currently in testing phase, I have created one test manager account 
with one test client account inside it. This is associated with email 
[email protected]. 
Then I had created one Production Manager account associated with 
[email protected](Gmail Business Account).

In this case, service account should be created from which email address ?

On Thursday, October 18, 2012 at 3:40:03 PM UTC+5:30, 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, [email protected] <javascript:>
>
> 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
> Email address        : [email protected] 
> <javascript:>
> Public key fingerprints    : 123456789abcdef123456789abcdef123456789a
>
> Private key's default filename is like 
> '123456789abcdef123456789abcdef123456789a-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/ with domain admin 
> account.
>
> - Go to 'Advanced Tools > Manage client API access'. 
> - Enter client ID, from above example that's '
> 123456789012.apps.googleusercontent.com' in 'Client Name' field. 
> - Enter '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 
>
>
> 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=
>
>
> - 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
>
> But replace getOAuth2Credential() with
>
> private static Credential getOAuth2Credential() throws Exception {
>
>     File keyFile = new 
> File("123456789abcdef123456789abcdef123456789a-privatekey.p12");
>          
>     GoogleCredential serviceAccountCredential = new 
> GoogleCredential.Builder()
>         .setTransport(new NetHttpTransport())
>         .setJsonFactory(new JacksonFactory())
>         .setServiceAccountId("[email protected] 
> <javascript:>")
>         .setServiceAccountScopes("https://adwords.google.com/api/adwords";)
>         .setServiceAccountPrivateKeyFromP12File(keyFile)
>         .setServiceAccountUser("[email protected] <javascript:>")
>         .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
>
> [email protected] <javascript:>
> 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:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/13c79b67-244f-40cc-93fc-e7449c487fb1%40googlegroups.com.

Reply via email to