Hi Brent,

"It seemed to me that service account was my only option, not an option I 
chose. I initially started down the path of doing exactly what you 
described, even using the Django sample included in the OAuth lib. However, 
all these examples, and in fact all API's except for service accounts 
seemed to require a "client_secret" which I do not see in my account. (I 
get a client_id obviously). What I do see is the p12 key, which tends to 
lead you to believe that you should be using that, and I believe the only 
type that uses that is using a Service Account.

I would have no problem using the more typical interactive authorization as 
the application does have a web interface, but I could not see how to get 
the API Console to give me a client_secret for the AdWords API. (I tried a 
couple of other API's out and they provide the client_secret and the OAuth 
examples work just fine).

Hopefully I am mistaken and there is a way to obtain a client_secret for 
AdWords and I can go down the simpler path of interactive authentification."

If I navigate to https://code.google.com/apis/console/ and choose my 
project, then click on "API Access", I see the attached screenshot that has 
the client ID and secret (that I previously created).  If you haven't 
already, you can create a client ID to use OAuth2 - service accounts are 
not the only way (and certainly not the easiest way).  What we recommend is 
to use the client ID and secret (from that page) to perform the OAuth2 flow 
once (for each account you would normally use an email and password with 
for ClientLogin) - save the refresh token and use it to obtain a fresh 
Access Token any time you need to make API calls.

- Kevin Winter
AdWords API Team

On Friday, May 3, 2013 10:38:00 AM UTC-4, Kevin Winter (AdWords API Team) 
wrote:
>
> Hi all,
>   The PHP does not currently support service accounts out-of-the-box - it 
> requires a combination of Google Client Libs integration to achieve this.
>
> For Python, you can pass that credentials object into the AdWordsClient 
> constructor like this: 
> https://code.google.com/p/google-api-ads-python/source/browse/trunk/examples/adspygoogle/adwords/v201302/misc/use_oauth2.py#75
>  . 
>  However, you need to explicitly impersonate a user.
>
> Can I ask why you are using service accounts?  Service accounts are used 
> to impersonate specific users while using Google Apps for your Domain.  For 
> most cases, simply performing the auth flow once and persisting the refresh 
> token is sufficient for non-interactive usage of the API.
>
> We're working to make it easier to use OAuth2 with the various client 
> libraries and would appreciate feedback.
>
> - Kevin Winter
> AdWords API Team
>
> On Wednesday, May 1, 2013 8:06:47 PM UTC-4, Brent Hoover wrote:
>>
>> Speaking about the Python lib:
>>
>> Firstly, I cannot seem to acquire anything from the API Console for 
>> AdWords that has a "client_secret", so all the interactive examples do not 
>> work for me. So if that was solvable I would not have gone down this second 
>> path which is:
>>
>> I have not seen anything that shows how to use a *service account 
>> authentification* to create the AdWords client object. All of the 
>> example for using the adwords with oauth require having a client_secret 
>> which we do not have (and cannot create for AdWords AFAIK). I can 
>> authenticate using the OAuthExample 
>> at: /google-api-python-client/samples/service_account and substituting 
>> AdWords for Tasks, but this hands me back an http object which I am unclear 
>> how I tie that into the adwords API.
>>
>> Specifically here: 
>>     credentials = SignedJwtAssertionCredentials(
>>         '[email protected]',
>>         key,
>>         scope='https://adwords.google.com/api/adwords')
>>     http = httplib2.Http()
>>     http = credentials.authorize(http)
>>
>> So what do I do now with that http object? The Java examples seems to 
>> hand back a authentification object which can be passed to the Adwords 
>> Client. Is any of that correct? It seems like other people are able to 
>> accomplish this, but I am lost.
>>
>> Any help would be really appreciated.
>>
>>
>> On Tuesday, April 30, 2013 9:16:08 AM UTC-7, 
>> [email protected]:
>>>
>>> Please Help!
>>>
>>> I have a service account, but have not seen a PHP example of how to set 
>>> this up for google adwords.  Any assistance will be appreciated!  Thank you 
>>> in advance!  On another note, I am currently getting incomplete_signup 
>>> error.  Info: Customer ID: 667-082-2778 .  Hope you have a great day.
>>>
>>> Best regards,
>>>
>>> David Paul
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


<<attachment: Screenshot from 2013-05-03 14:31:22.png>>

Reply via email to