Client Authentication, What would you suggest?

119 views
Skip to first unread message

Rob Ryan

unread,
Jun 26, 2011, 8:39:54 PM6/26/11
to adwor...@googlegroups.com
Currently with OAuth not being a complete option and it being seemly impossible to automatically send out a request to join an MCC (although I know some services do it so any pointers in the right direction on how to do this would be great) it seems the only option for something automated is to collect the users email and password for their adwords accounts. Is this the current best practises way people are doing this?

Murray

unread,
Jul 3, 2011, 6:28:13 AM7/3/11
to AdWords API Forum
Hi Eric

Can you please offer some advice here? Any input would be sincerely
appreciated. We're totally in the dark here about this.

Regards

Murray

Anash P. Oommen

unread,
Jul 4, 2011, 12:34:11 AM7/4/11
to AdWords API Forum
Hi Murray, Rob,

Currently, the AdWords API doesn't provide a way to link a child
account under an MCC account. Since OAuth support isn't available in
all the client libraries, the recommended way is to link the child
account under a common MCC and then make calls on that account's
behalf. Linking the MCC and child accounts is a manual one-time
process, but after that you can automate managing the account using
AdWords API.

Collecting the email / password of all accounts is probably not a good
idea, there might be customers who aren't comfortable with that. One
mid-way alternative would be to ask the client to invite a login of
yours to manage the client account and then use that login email to
manage the account.

Hope this helps. Let me know if you have more questions.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Rob Ryan

unread,
Jul 4, 2011, 4:00:00 AM7/4/11
to adwor...@googlegroups.com
Any plans to add the authorization process to the API? 
Really we would just be using it as a stop gap until report downloads are available through OAuth as the OAuth system is a lot nicer to use and much better for this authorization stuff. Looks like the manual authorization might be the best way to go for now.

Anash P. Oommen

unread,
Jul 5, 2011, 2:48:13 AM7/5/11
to adwor...@googlegroups.com
Hi Rob,

As of now, manual authorization is the best way to go. OAuth for reports is on the charts, and there have been a lot of interest in it on the forum lately. As of now, I don't have a solid date by which the feature would be available though.

yagmur

unread,
Jul 19, 2011, 10:35:48 AM7/19/11
to adwor...@googlegroups.com
Hi Anash, 

I understand OATH for reports is on the charts but do you have a beta program we can join to test out as soon as it is available? Is there a different channel I should email regarding this request? We're striving to provide the best possible customer experience with our application and asking for email/password is a bit rough so we'll be happy to be a beta tester.

Thank you,
Yagmur

yagmur

unread,
Jul 19, 2011, 5:09:06 PM7/19/11
to adwor...@googlegroups.com
Until OAuth becomes available, I will take the manual authorization path.

How do you create an AdWordsUser object (C#) using customer's email and password? I need to pull reports. The AdWordsUser(headers) construct picks up info from the config file regardless of passing a dictionary<string,string> loaded with all data, so I am not really sure about this. Please assume that the customer account is one that is NOT in my MCC but I have their email and password. I have my developer token.

I guess there is a way to use my developer token along with customer's email and password. I believe this was mentioned somewhere but could not find it again. Sample code would be wonderful.

Thanks in advance.
Yagmur

yagmur

unread,
Jul 21, 2011, 11:58:39 AM7/21/11
to adwor...@googlegroups.com
Bumping the question since I haven't heard back in 2 days :)

Again, the questions is how to create the AdWordsUser object with my developer key and customer's email and password who is not part of my MCC, to pull their reports. 

There was a .net client update 2 days ago but it wasn't mentioned in the api blog (most other clients were mentioned though). There seems to be a new AuthorizationMethod entry in the config to pick between ClientLogin and OAuth (although not supporting reports I guess)... and this is not documented anywhere except inline in the configuration file. So I am not sure if this change helps me in any way.

Perhaps I need to construct the soap header and body myself instead of using the .net client?

Please help, I am stuck.

Thanks again,
Yagmur

AdWords API Advisor

unread,
Jul 26, 2011, 11:24:05 AM7/26/11
to adwor...@googlegroups.com
Hi Yagmur,

AdWordsUser(header) does work, I'm not sure why it isn't working for you. See http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/examples/csharp/v13/AccountServiceNoConfigDemo.cs for details. Other than that, there are couple of more ways to switch the config at runtime.

1. user.config.DeveloperToken = newdevelopertoken;
    service = (CampaignService) user.GetService(AdWordsService.v201101.CampaignService);

2. service = (CampaignService) user.GetService(AdWordsService.v201101.CampaignService);
    service.RequestHeader.DeveloperToken = newdevelopertoken;

The OAuth addition for the .NET library missed the client library update blog, I guess it will be announced for the next update blog. There's an ASP.NET project example that shows how the library works with OAuth. Essentially, you comment out Email, Password in web.config, set AuthorizationMethod to OAuth. Then initialize the OAuth library in your Global.asax.cs.


Hope this helps. Let me know if you have more questions.

yagmur

unread,
Jul 26, 2011, 11:31:49 AM7/26/11
to AdWords API Forum
Hi,

I am not sure why but the AdWords with header param construct didn't
work for me for a while... Now it does, so I am happily coding away.

About OAuth, can I download my clients' reports? I thought that was
the limitation a while back.

Thanks,
Yagmur

On Jul 26, 11:24 am, AdWords API Advisor
<adwordsapiadvi...@google.com> wrote:
> Hi Yagmur,
>
> AdWordsUser(header) does work, I'm not sure why it isn't working for you.
> Seehttp://code.google.com/p/google-api-adwords-dotnet/source/browse/trun...for
> details. Other than that, there are couple of more ways to switch the config
> at runtime.
>
> 1. user.config.DeveloperToken = newdevelopertoken;
>     service = (CampaignService)
> user.GetService(AdWordsService.v201101.CampaignService);
>
> 2. service = (CampaignService)
> user.GetService(AdWordsService.v201101.CampaignService);
>     service.RequestHeader.DeveloperToken = newdevelopertoken;
>
> The OAuth addition for the .NET library missed the client library update
> blog, I guess it will be announced for the next update blog. There's an
> ASP.NET project example that shows how the library works with OAuth.
> Essentially, you comment out Email, Password in web.config, set
> AuthorizationMethod to OAuth. Then initialize the OAuth library in your
> Global.asax.cs.
>
> Seehttp://code.google.com/p/google-api-adwords-dotnet/source/browse/#svn...for

AdWords API Advisor

unread,
Jul 27, 2011, 1:22:55 AM7/27/11
to adwor...@googlegroups.com
Hi Yagmur,

AdWordsUser(header) was broken in v12.2.0 and fixed in v12.3.0. May be you had a broken library version at your end for a while. Report downloads using OAuth is still not available, so you can't use OAuth for reporting yet. For other services, OAuth works fine and the library fully supports it.

yagmur

unread,
Jul 27, 2011, 3:38:01 PM7/27/11
to adwor...@googlegroups.com
Thanks Anash! 

I hope the OAuth option for downloading reports is in the works. Please let me (and other's I'm sure are waiting for this too) know when there is some news on that front.

Thanks again,
Yagmur

AdWords API Advisor

unread,
Aug 11, 2011, 8:57:00 AM8/11/11
to adwor...@googlegroups.com
Hi Yagmur,

OAuth for downloading reports is a widely requested feature. The AdWords team knows about it and it is in the roadmap. I don't have a date by which this feature will be available, but we will definitely announce on the forum and our blog (adwordsapi.blogspot.com) when this feature becomes available in AdWords API.

API Developer

unread,
Sep 9, 2011, 4:27:46 PM9/9/11
to AdWords API Forum
I have a question about how API charges are billed. I assume the API
charges - even for manually linked client accounts - are all
consolidated under the MCC and billed to the MCC account holder. But
is there a way to identify the API charges per client? Are these
reported separately... or can the actual API usage at the client
level be discovered?


On Jul 26, 9:24 am, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Hi Yagmur,
>
> AdWordsUser(header) does work, I'm not sure why it isn't working for you.
> Seehttp://code.google.com/p/google-api-adwords-dotnet/source/browse/trun...for
> details. Other than that, there are couple of more ways to switch the config
> at runtime.
>
> 1. user.config.DeveloperToken = newdevelopertoken;
>     service = (CampaignService)
> user.GetService(AdWordsService.v201101.CampaignService);
>
> 2. service = (CampaignService)
> user.GetService(AdWordsService.v201101.CampaignService);
>     service.RequestHeader.DeveloperToken = newdevelopertoken;
>
> The OAuth addition for the .NET library missed the client library update
> blog, I guess it will be announced for the next update blog. There's an
> ASP.NET project example that shows how the library works with OAuth.
> Essentially, you comment out Email, Password in web.config, set
> AuthorizationMethod to OAuth. Then initialize the OAuth library in your
> Global.asax.cs.
>
> Seehttp://code.google.com/p/google-api-adwords-dotnet/source/browse/#svn...for

API Developer

unread,
Sep 9, 2011, 4:44:08 PM9/9/11
to AdWords API Forum
And if I can add one question... who is liable for the content in
the campaign, the MCC account holder or the client account holder?
Example: if unacceptable keyword use practices are discovered who is
liable?


On Sep 9, 2:27 pm, API Developer <lawles...@gmail.com> wrote:
> I have a question about how API charges are billed.  I assume the API
> charges - even for manually linked client accounts - are all
> consolidated under theMCCand billed to theMCCaccount holder.  But
> is there a way to identify the API charges per client?  Are these
> reported separately...   or can the actual API usage at the client
> level be discovered?
>
> On Jul 26, 9:24 am, AdWords API Advisor <adwordsapiadvi...@google.com>
> wrote:
>
>
>
>
>
>
>
> > Hi Yagmur,
>
> > AdWordsUser(header) does work, I'm not sure why it isn't working for you.
> > Seehttp://code.google.com/p/google-api-adwords-dotnet/source/browse/trun...
> > details. Other than that, there are couple of more ways to switch the config
> > at runtime.
>
> > 1. user.config.DeveloperToken = newdevelopertoken;
> >     service = (CampaignService)
> > user.GetService(AdWordsService.v201101.CampaignService);
>
> > 2. service = (CampaignService)
> > user.GetService(AdWordsService.v201101.CampaignService);
> >     service.RequestHeader.DeveloperToken = newdevelopertoken;
>
> > The OAuth addition for the .NET library missed the client library update
> > blog, I guess it will be announced for the next update blog. There's an
> > ASP.NET project example that shows how the library works with OAuth.
> > Essentially, you comment out Email, Password in web.config, set
> > AuthorizationMethod to OAuth. Then initialize the OAuth library in your
> > Global.asax.cs.
>
> > Seehttp://code.google.com/p/google-api-adwords-dotnet/source/browse/#svn...

David Torres

unread,
Sep 13, 2011, 12:44:08 PM9/13/11
to adwor...@googlegroups.com
Hi,

API units are charged to the token (therefore the MCC that holds the token) which made the call.

API usage per client can be reported using the InfoService as long as the clients are connected to the MCC (directly or indirectly)

Best,

-David Torres - AdWords API Team

David Torres

unread,
Sep 13, 2011, 12:46:15 PM9/13/11
to adwor...@googlegroups.com
Hi,

Regarding liability, that is a good non API question that unfortunately we don't have an answer. But you can post your question to AdWords support forum http://www.google.com/support/forum/p/AdWords?hl=en&utm_source=HC&utm_medium=leftnav&utm_campaign=adwords
Reply all
Reply to author
Forward
0 new messages