I appreciate your feedback.  I notice the format for the webservices' SOAP 
message header is a bit different for AdWords than it is for GA.  If 
possible can you point me to the documentation for the AdWords OAuth2 
please?

In GA, we are adding the following header to our SOAP message, 
"Authorization: GoogleLogin auth=" + Token, where Token is the access_token 
we extract from the response to the POST request made to 
https://accounts.google.com/o/oauth2/token with a message body 
"refresh_token={0}&client_id={1}&client_secret={2}&grant_type=refresh_token"

It is also being passed as a parameter in the URL:
https://www.googleapis.com/analytics/v3/data/ga?ids={0}&dimensions={1}&metrics={2}&start-date={3}&end-date={4}&sort={5}&access_token={6}";
       
Dim uri As String
uri = GetVisitURI(Token, ProfileID, from, todate)
myRequest = HttpWebRequest.Create(uri)
myRequest.Headers.Add("Authorization: GoogleLogin auth=" + Token)
myResponse = myRequest.GetResponse

For AdWords I need to use the following header with the access_token?

myRequest.Headers.Add("Authorization: Bearer=" + Token)

Thanks much!
David

On Thursday, October 4, 2012 10:42:39 AM UTC-4, Anash P. Oommen wrote:
>
> Hi,
>
> OAuth2 scope for AdWords API is https://adwords.google.com/api/adwords/or 
> https://adwords-sandbox.google.com/api/adwords/ depending on whether you 
> are making calls to AdWords API production or sandbox environment. As with 
> the other services, you get the OAuth2 client id and secret from 
> https://code.google.com/apis/console, just that you don't need to turn on 
> support for AdWords API, it will just work.
>
> Other than that, the AdWords API uses OAuth2 just like the way any other 
> service does - add an Authorization: Bearer xxx http header to your 
> outgoing SOAP message.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor
>
> On Thursday, 4 October 2012 19:46:56 UTC+5:30, okieb...@gmail.com wrote:
>>
>> I'm trying to schedule migration for my reporting apps.  I successfully 
>> moved all my Google Analytics data webservice consumption from the client 
>> log-in to OAUTH2.  In order to achieve this I needed to register my 
>> "Installed App" at https://code.google.com/apis/console and use the 
>> Client ID and secret, etc.  When I attempted to do this for AdWords API, I 
>> did not see an AdWords API in the "Services" section, so I simply used the 
>> API Access section to register my "Installed App", and noted the generated 
>> settings.  So my question is, does the AdWords API for version 
>> 201206 support OAUTH2 or should I continue to use the clientLogInUrl As 
>> String = "https://www.google.com/accounts/ClientLogin"; logic for my 
>> authentication?  I'm using in-house home-grown .NET code and not the client 
>> libraries.
>>
>> Next if OAUTH2 is supported, is the registration process via the 
>> /apis/console/ the proper way, I'm not sure since there was not an AdWords 
>> w/n the list of "Services"? Also, what would be the proper "scope" 
>> parameter for the generation of an "Auth Grant" via 
>> https://accounts.google.com/o/oauth2/auth, for GA it was: 
>> scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.readonly.  
>>
>> I am following the documentation found here: http://goo.gl/R9xYB
>>
>> Thanks for your assistance,
>> David  
>>
>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to