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] <javascript:>', > 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.
