Hi, 

When you use OAuth2, the header should be like this in *HTTP* header not in 
the SOAP header like when you use ClientLogin. 

Authorization: Bearer <Your access token> 

Please see this 
guide<https://developers.google.com/adwords/api/docs/authentication#oauth2>
. 
If you are using our client library, it should take care of that. 

Best,
- Takeshi, AdWords API Team

On Friday, August 16, 2013 5:49:14 AM UTC+9, Alistair Ballantine wrote:
>
> I'm having a little difficulty figuring out how to Download AdHoc reports 
> using OAuth2 as the authentication mechanism. I can retrieve an 
> access_token just fine using OAuth, but I only ever get the 
> error GOOGLE_ACCOUNT_COOKIE_INVALID when using it. I can successfully 
> connect and download a report using the old ClientLogin method, and I'm 
> wondering if I'm missing a step in OAuth that would retrieve an "authToken" 
> or if there's some other change to the headers I have to make to pull the 
> report. 
>
> The headers I'm using for downloading a report are effectively (in PHP):
>
> 'Authorization: GoogleLogin auth=' . $access_token,
> 'clientCustomerId: ' . $client_id,
> 'developerToken: ' . $dev_token
>
> The $access token is what would be retrieved as a response to this 
> essential POST request (taken from 
> https://developers.google.com/accounts/docs/OAuth2WebServer?csw=1#refresh)
>
> POST /o/oauth2/token HTTP/1.1
> Host: accounts.google.com
> Content-Type: application/x-www-form-urlencoded
>
> client_id=8819981768.apps.googleusercontent.com&
> client_secret={client_secret}&
> refresh_token=1/6BMfW9j53gdGImsiyUH5kU5RsR4zwI9lUVX-tqf8JXQ&
> grant_type=refresh_token
>
> Am I using the wrong token? Am I missing a step? Should I change the Adhoc 
> report HTTP Headers? Any guidance or direction would be much appreciated. 
>
> Thank you 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

--- 
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to