.setServiceAccountId("123456789012@developer.gserviceaccount.com")
.setServiceAccountScopes("https://adwords.google.com/api/adwords")
.setServiceAccountPrivateKeyFromP12File(keyFile)
.setServiceAccountUser("adwords...@yourdomain.com")
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
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
.setServiceAccountId("123456789012@developer.gserviceaccount.com")
.setServiceAccountScopes("https://adwords.google.com/api/adwords")
.setServiceAccountPrivateKeyFromP12File(keyFile)
.setServiceAccountUser("adwords...@yourdomain.com")
Hi Arpit,
As a credential generated for an Google Ads manager account can be used to access all its child accounts. It will be sufficient for you to generate credentials for each MCC manager account. Since you have both the test manager account and production manager account, it depends on which account you would like to have access for your application. If you would like to have access for both accounts then you need to create service accounts for both manager accounts separately. Please refer to this guide for more details on generating credentials and creating service accounts. Please let us know if you have any further questions.
Thanks and regards,
Xiaoming, Google Ads API Team