Re: Correct way to retrieve users from AdWords API

2015-01-15 Thread Martin Geubelle
Dear Josh,

Thank you very much for you answer, it takes on its full meaning for me now 
! I really appreciate.

Cheers,

Martin

Le jeudi 15 janvier 2015 16:17:27 UTC+1, Josh Radcliff (AdWords API Team) a 
écrit :
>
> Hi Martin,
>
> The difference between CustomerService.get 
> <https://developers.google.com/adwords/api/docs/reference/v201409/CustomerService#get>
>  and ManagedCustomerService.get 
> <https://developers.google.com/adwords/api/docs/reference/v201409/ManagedCustomerService#get>
>  is 
> as follows:
>
>- The *Customer* object you get back from *CustomerService.get* depends 
>on the presence or absence of the clientCustomerId SOAP header 
>
> <https://developers.google.com/adwords/api/docs/guides/soap#clientCustomerId> 
> in 
>your request.
>   - If *clientCustomerId* is set, then you will get back the 
>   *Customer* object for that customer (Customer.customerId 
>   
> <https://developers.google.com/adwords/api/docs/reference/v201409/CustomerService.Customer#customerId>
>  will 
>   be equal to *clientCustomerId*)
>   - If *clientCustomerId* is *not* set, then you will get back the 
>   *Customer* object for the customer associated with your OAuth 
>   credential's account. If your OAuth credentials are for your MCC, 
> you'll 
>   get back the *Customer* object for your MCC. If your OAuth 
>   credentials are for a specific client account, you'll get back the 
>   *Customer* object for that client account.
>- The ManagedCustomer 
>
> <https://developers.google.com/adwords/api/docs/reference/v201409/ManagedCustomerService.ManagedCustomer>
>  objects 
>you get back from *ManagedCustomerService.get* will be the set of 
>customers managed by the account specified in the *clientCustomerId* SOAP 
>header.
>
> Hopefully that clears things up, but let me know if I missed anything.
>
> Cheers,
> Josh, AdWords API Team
>
> On Thursday, January 15, 2015 at 7:48:03 AM UTC-5, Martin Geubelle wrote:
>>
>> Hi there,
>>
>> I was wondering about the proper way of getting the CustomerId of an 
>> account in all cases using the API. First, I was using the service 
>> "ManagedCustomerService" and that worked well for my accounts, until I 
>> noticed that I couldn't get accounts that were not managed by MCC (if I 
>> understood well). I then used ''CustomerService'' if nothing was returned 
>> by the first service. Is this the correct way to do that ?
>>
>> Cheers,
>>
>>
>> Martin
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/64fb478b-8109-48aa-8534-c91a7fc9c3fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Correct way to retrieve users from AdWords API

2015-01-15 Thread Martin Geubelle
Hi there,

I was wondering about the proper way of getting the CustomerId of an 
account in all cases using the API. First, I was using the service 
"ManagedCustomerService" and that worked well for my accounts, until I 
noticed that I couldn't get accounts that were not managed by MCC (if I 
understood well). I then used ''CustomerService'' if nothing was returned 
by the first service. Is this the correct way to do that ?

Cheers,


Martin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3406ef3d-d30a-451a-8c36-95d05778ed7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AuthenticationError.LOGIN_COOKIE_REQUIRED

2014-11-25 Thread Martin Geubelle
Solution found on this page 
: https://developers.google.com/accounts/docs/OAuth2WebServer

Use approval_prompt=force

Martin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/789e3461-efd7-4551-812d-04f824cd383d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AuthenticationError.LOGIN_COOKIE_REQUIRED

2014-11-25 Thread Martin Geubelle
Hi,

The workaround I found for now is to revoke the access token and ask the 
authorization again, but it's not very convenient.

I just don't get why it's possible in local with an "native application 
client identifier" and not on the web with an "web application client 
identifier" ... What could justify this difference ?

Thanks,


Martin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/795fd1c6-c973-4666-8fe5-22a865a94caf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AuthenticationError.LOGIN_COOKIE_REQUIRED

2014-11-24 Thread Martin Geubelle
Thank you for you quick answer !

*"Generally, you can approve one application only once per account, so you 
may be hitting a "wrong" (already authorized) account in the process."*

Is it only true for Web application ? Because in local I have never 
experienced this problem ... In fact, when the user disconnects and tries 
to come back later to our website, in order to authenticate him, we use his 
Google account (and not a special login from ours) so this is why I try to 
hit an already authorized account.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3682b63b-4307-4b39-8e4f-1c1b22d89294%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AuthenticationError.LOGIN_COOKIE_REQUIRED

2014-11-24 Thread Martin Geubelle
*"Generally, you can approve one application only once per account, so you 
may be hitting a "wrong" (already authorized) account in the process."*

Is it only true for Web application ? Because in local I have never 
experienced this problem ... In fact, when the user disconnects and tries 
to come back later to our website, in order to authenticate him, we use his 
Google account (and not a special login from ours) so this is why I try to 
hit an already authorized account.

Le lundi 24 novembre 2014 12:10:12 UTC+1, Danial Klimkin a écrit :
>
> Hello Martin,
>
>
> This is a tricky case. Generally, we recommend logging off from every 
> account and logging in with the one you'd like to authorize for.
>
> Generally, you can approve one application only once per account, so you 
> may be hitting a "wrong" (already authorized) account in the process.
>
>
> -Danial, AdWords API Team.
>
>
> On Monday, November 24, 2014 1:28:55 PM UTC+3, Martin Geubelle wrote:
>>
>> Hi,
>>
>> Since I am using my application on the web client (and not in local 
>> anymore), I have experienced a strange error.
>> It looks like I can retrieve refresh/access token for the same adwords 
>> account only once. I am using Python Library.
>>
>>1. I state the URL for getting API access (like : 
>>
>> https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/adwords&redirect_uri=#MYPAGEn&response_type=code&client_id=#MYCLIENTID.apps.googleusercontent.com&access_type=offline
>>). 
>>2. Because I have multiple account, that link sends me to the page 
>>accountChooser (like 
>>
>> https://accounts.google.com/AccountChooser?service=lso&continue=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Fauth%3Fresponse_type%3Dcode%26scope%3Dhttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords%26access_type%3Doffline%26redirect_uri%3D#MYPAGE%26client_id%#MYCLIENTID.apps.googleusercontent.com%26hl%3Dfr%26from_login%3D#MYLOGIN&btmpl=authsub&hl=fr
>>  
>>--> see attachment 1). 
>>3. Normally, after choosing one of the account, I am redirected to 
>>the "Accept API access page" (see attachment 2), and then I click on 
>>"accept" and 
>>4. I am redirected to #MYPAGE?code=4/#THECODE and I can authenticate 
>>with flow = OAuth2WebServerFlow(...) and flow.step2_exchange(#THECODE)
>>
>> The problems arises when I already have the access for one account and I 
>> try to redo the same operation. At step 2), after choosing the account, 
>> Google seems to skip step 3) and go directly to step 4) where I try to 
>> authenticate and that gives me a *"Server raised fault: 
>> '[AuthenticationError.LOGIN_COOKIE_REQUIRED @ ; trigger:'']'"*.
>>
>> Is it a normal behaviour ? Can I only retrieve API access ONCE per 
>> account on a website with a "Client identifier for a Web application" (even 
>> if I can do it multiple times in local with a "Client identifier for a 
>> Native Application") ?
>>
>> Thanks,
>>
>> Martin
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/15c56d79-3a7c-419f-a9ed-e7a903b21fdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AuthenticationError.LOGIN_COOKIE_REQUIRED

2014-11-24 Thread Martin Geubelle
Hi,

Since I am using my application on the web client (and not in local 
anymore), I have experienced a strange error.
It looks like I can retrieve refresh/access token for the same adwords 
account only once. I am using Python Library.

   1. I state the URL for getting API access (like 
   : 
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/adwords&redirect_uri=#MYPAGEn&response_type=code&client_id=#MYCLIENTID.apps.googleusercontent.com&access_type=offline).
 
   2. Because I have multiple account, that link sends me to the page 
   accountChooser 
   (like 
https://accounts.google.com/AccountChooser?service=lso&continue=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Fauth%3Fresponse_type%3Dcode%26scope%3Dhttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords%26access_type%3Doffline%26redirect_uri%3D#MYPAGE%26client_id%#MYCLIENTID.apps.googleusercontent.com%26hl%3Dfr%26from_login%3D#MYLOGIN&btmpl=authsub&hl=fr
 
   --> see attachment 1). 
   3. Normally, after choosing one of the account, I am redirected to the 
   "Accept API access page" (see attachment 2), and then I click on "accept" 
   and 
   4. I am redirected to #MYPAGE?code=4/#THECODE and I can authenticate 
   with flow = OAuth2WebServerFlow(...) and flow.step2_exchange(#THECODE)
   
The problems arises when I already have the access for one account and I 
try to redo the same operation. At step 2), after choosing the account, 
Google seems to skip step 3) and go directly to step 4) where I try to 
authenticate and that gives me a *"Server raised fault: 
'[AuthenticationError.LOGIN_COOKIE_REQUIRED @ ; trigger:'']'"*.

Is it a normal behaviour ? Can I only retrieve API access ONCE per account 
on a website with a "Client identifier for a Web application" (even if I 
can do it multiple times in local with a "Client identifier for a Native 
Application") ?

Thanks,

Martin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9babbeff-e17f-43b8-8c17-453c4cf3f06a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.