Re: Programatically see what level of access an account manager is given

2019-01-28 Thread James Andrews
I seem to have gotten unnoticed, anyone? bueller?


On Thursday, January 24, 2019 at 10:42:58 PM UTC+9, James Andrews wrote:
>
> Hello,
>
> I have an manager account with several managed accounts of varying access 
> level.  I would like to be able to sort the managed accounts into groups by 
> access level, but I don't see a call in the API docs to get the access 
> level a manager has via the API.   Does such a call exist?  And if so can 
> you point me in the right direction?
>
> Thanks,
> James
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a6648479-5417-42e1-8c1d-fae2e7620e94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-13 Thread James Andrews
These errors have disappeared.  Not sure what happened but wanted to report 
what I am seeing in our environment.

James

> On Jun 12, 2018, at 7:51 AM, Alon Diamant  wrote:
> 
> Hey there Caihua,
> 
> Mind sharing what you by "empty client customer ID"? I send in an empty 
> string or a null in clientCustomerId and I still get the same 
> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED error.
> 
> Thanks,
> 
> Alon
> 
> On Monday, June 11, 2018 at 9:21:11 PM UTC+3, Caihua Du wrote:
> This issue happened to us too. Lots of client have the same errors and it 
> suddenly shows up from 6/8 and nothing has been changed from our side. 
> 
> In our code, we will have to pass in an empty client customer id in order to 
> get back all the accounts under this customer. Not sure what has been changed 
> from API side. 
> 
> Please help take a look, thanks!
> Caihua.
> 
> 
> On Monday, June 11, 2018 at 4:44:55 AM UTC-7, James Andrews wrote:
> I had left it alone over the weekend, to see if it fixed itself, and was just 
> digging into why it was happening, I’ll look there as well and confirm that’s 
> where the error is happening.
> 
> Thanks
> James
> 
>> On Jun 11, 2018, at 7:44 PM, Ondřej P > wrote:
>> 
>> Hi James,
>> 
>> it happens intermittently during the getCustomers API call.
>> 
>> Ondrej
>> 
>> Dne pondělí 11. června 2018 12:17:22 UTC+2 James Andrews napsal(a):
>> Well glad it's not just me, not glad that either of us have to deal with 
>> this.  I am still getting these errors intermittently.  Are they always 
>> called?  or do they show up intermittently for you as well?
>> 
>> James
>> 
>> On Monday, June 11, 2018 at 7:14:10 PM UTC+9, Ondřej P wrote:
>> Hi,
>> 
>> I have the same issue since 8.6.2018.
>> SOAP request:
>> 
>> http://schemas.xmlsoap.org/soap/envelope/ 
>> <http://schemas.xmlsoap.org/soap/envelope/>" 
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema 
>> <http://www.w3.org/2001/XMLSchema>" 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
>> <http://www.w3.org/2001/XMLSchema-instance>">
>> 
>> > xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>" 
>> soapenv:mustUnderstand="0">
>> > xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">REDACTED
>> > xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">ROI-Hunter (AwApi-Java, 
>> AdWords-Axis/3.12.0, Common-Java/3.12.0, Axis/1.4, Java/1.8.0_91, 
>> maven)
>> > xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">false
>> > xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">false
>> 
>> 
>> 
>> > xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>"/>
>> 
>> 
>> 
>> Response:
>> 
>> http://schemas.xmlsoap.org/soap/envelope/ 
>> <http://schemas.xmlsoap.org/soap/envelope/>">
>> 
>> > xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>" 
>> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">
>> 00056e5a331a8a1b6f439c090121
>> CustomerService
>> getCustomers
>> 1
>> 225
>> 
>> 
>> 
>> 
>> soap:Server
>> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED 
>> @ ; trigger:'<null>']
>> 
>> > xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>" 
>> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">
>> 
>> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; 
>> trigger:'<nu

Re: Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-11 Thread James Andrews
Thank you Josh!

James



> On Jun 12, 2018, at 5:51 AM, 'Josh Radcliff (AdWords API Team)' via AdWords 
> API and Google Ads API Forum  wrote:
> 
> Hi,
> 
> Thanks for reporting this. I've raised it and will provide an update as soon 
> as I have more information.
> 
> Thanks,
> Josh, AdWords API Team
> 
> On Monday, June 11, 2018 at 2:21:11 PM UTC-4, Caihua Du wrote:
> This issue happened to us too. Lots of client have the same errors and it 
> suddenly shows up from 6/8 and nothing has been changed from our side. 
> 
> In our code, we will have to pass in an empty client customer id in order to 
> get back all the accounts under this customer. Not sure what has been changed 
> from API side. 
> 
> Please help take a look, thanks!
> Caihua.
> 
> 
> On Monday, June 11, 2018 at 4:44:55 AM UTC-7, James Andrews wrote:
> I had left it alone over the weekend, to see if it fixed itself, and was just 
> digging into why it was happening, I’ll look there as well and confirm that’s 
> where the error is happening.
> 
> Thanks
> James
> 
>> On Jun 11, 2018, at 7:44 PM, Ondřej P > wrote:
>> 
>> Hi James,
>> 
>> it happens intermittently during the getCustomers API call.
>> 
>> Ondrej
>> 
>> Dne pondělí 11. června 2018 12:17:22 UTC+2 James Andrews napsal(a):
>> Well glad it's not just me, not glad that either of us have to deal with 
>> this.  I am still getting these errors intermittently.  Are they always 
>> called?  or do they show up intermittently for you as well?
>> 
>> James
>> 
>> On Monday, June 11, 2018 at 7:14:10 PM UTC+9, Ondřej P wrote:
>> Hi,
>> 
>> I have the same issue since 8.6.2018.
>> SOAP request:
>> 
>> http://schemas.xmlsoap.org/soap/envelope/ 
>> <http://schemas.xmlsoap.org/soap/envelope/>" 
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema 
>> <http://www.w3.org/2001/XMLSchema>" 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
>> <http://www.w3.org/2001/XMLSchema-instance>">
>> 
>> > xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>" 
>> soapenv:mustUnderstand="0">
>> > xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">REDACTED
>> > xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">ROI-Hunter (AwApi-Java, 
>> AdWords-Axis/3.12.0, Common-Java/3.12.0, Axis/1.4, Java/1.8.0_91, 
>> maven)
>> > xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">false
>> > xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">false
>> 
>> 
>> 
>> > xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>"/>
>> 
>> 
>> 
>> Response:
>> 
>> http://schemas.xmlsoap.org/soap/envelope/ 
>> <http://schemas.xmlsoap.org/soap/envelope/>">
>> 
>> > xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>" 
>> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">
>> 00056e5a331a8a1b6f439c090121
>> CustomerService
>> getCustomers
>> 1
>> 225
>> 
>> 
>> 
>> 
>> soap:Server
>> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED 
>> @ ; trigger:'<null>']
>> 
>> > xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
>> <https://adwords.google.com/api/adwords/mcm/v201802>" 
>> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
>> <https://adwords.google.com/api/adwords/cm/v201802>">
>> 
>> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; 
>> trigger:'<null>']
>> 
>> ApiException
>>

Re: Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-11 Thread James Andrews
I had left it alone over the weekend, to see if it fixed itself, and was just 
digging into why it was happening, I’ll look there as well and confirm that’s 
where the error is happening.

Thanks
James

> On Jun 11, 2018, at 7:44 PM, Ondřej P  wrote:
> 
> Hi James,
> 
> it happens intermittently during the getCustomers API call.
> 
> Ondrej
> 
> Dne pondělí 11. června 2018 12:17:22 UTC+2 James Andrews napsal(a):
> Well glad it's not just me, not glad that either of us have to deal with 
> this.  I am still getting these errors intermittently.  Are they always 
> called?  or do they show up intermittently for you as well?
> 
> James
> 
> On Monday, June 11, 2018 at 7:14:10 PM UTC+9, Ondřej P wrote:
> Hi,
> 
> I have the same issue since 8.6.2018.
> SOAP request:
> 
> http://schemas.xmlsoap.org/soap/envelope/ 
> <http://schemas.xmlsoap.org/soap/envelope/>" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema 
> <http://www.w3.org/2001/XMLSchema>" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> <http://www.w3.org/2001/XMLSchema-instance>">
> 
>  xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201802 
> <https://adwords.google.com/api/adwords/mcm/v201802>" 
> soapenv:mustUnderstand="0">
>  xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
> <https://adwords.google.com/api/adwords/cm/v201802>">REDACTED
>  xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802 
> <https://adwords.google.com/api/adwords/cm/v201802>">ROI-Hunter (AwApi-Java, 
> AdWords-Axis/3.12.0, Common-Java/3.12.0, Axis/1.4, Java/1.8.0_91, 
> maven)
>  xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201802 
> <https://adwords.google.com/api/adwords/cm/v201802>">false
>  xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201802 
> <https://adwords.google.com/api/adwords/cm/v201802>">false
> 
> 
> 
>  xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
> <https://adwords.google.com/api/adwords/mcm/v201802>"/>
> 
> 
> 
> Response:
> 
> http://schemas.xmlsoap.org/soap/envelope/ 
> <http://schemas.xmlsoap.org/soap/envelope/>">
> 
>  xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
> <https://adwords.google.com/api/adwords/mcm/v201802>" 
> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
> <https://adwords.google.com/api/adwords/cm/v201802>">
> 00056e5a331a8a1b6f439c090121
> CustomerService
> getCustomers
> 1
> 225
> 
> 
> 
> 
> soap:Server
> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED 
> @ ; trigger:'<null>']
> 
>  xmlns="https://adwords.google.com/api/adwords/mcm/v201802 
> <https://adwords.google.com/api/adwords/mcm/v201802>" 
> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802 
> <https://adwords.google.com/api/adwords/cm/v201802>">
> 
> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; 
> trigger:'<null>']
> 
> ApiException
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> <http://www.w3.org/2001/XMLSchema-instance>" 
> xsi:type="ns2:AuthenticationError">
> 
> <null>
> 
> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED
> 
> AuthenticationError
> 
> CLIENT_CUSTOMER_ID_IS_REQUIRED
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Dne pátek 8. června 2018 19:43:41 UTC+2 James Andrews napsal(a):
> Our software has been working for months with no issues, tonight suddenly all 
> of our Adwords tokens throw this error.
> 
> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED
> 
> Is something broken?  Is there a place we can go to see what the status of an 
> API is if there are problems?
> 
> Thanks,
> James
> 
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog:
> https://googleadsdeveloper.blogspot.com/ 
> <https://googleadsdeveloper.blogspot.com/>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>  
> You received this message because you are subscribed to the Google

Re: Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-11 Thread James Andrews
Well glad it's not just me, not glad that either of us have to deal with 
this.  I am still getting these errors intermittently.  Are they always 
called?  or do they show up intermittently for you as well?

James

On Monday, June 11, 2018 at 7:14:10 PM UTC+9, Ondřej P wrote:
>
> Hi,
>
> I have the same issue since 8.6.2018.
> SOAP request:
> 
> http://schemas.xmlsoap.org/soap/envelope/
> " xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
> 
> https://adwords.google.com/api/adwords/mcm/v201802"; soapenv:mustUnderstand
> ="0">
> https://adwords.google.com/api/adwords/cm/v201802";>REDACTED
> 
> https://adwords.google.com/api/adwords/cm/v201802";>ROI-Hunter 
> (AwApi-Java, AdWords-Axis/3.12.0, Common-Java/3.12.0, Axis/1.4, 
> Java/1.8.0_91, maven)
> https://adwords.google.com/api/adwords/cm/v201802";>false
> 
> https://adwords.google.com/api/adwords/cm/v201802";>false
> 
> 
> 
> 
> https://adwords.google.com/api/adwords/mcm/v201802"/>
> 
> 
>
> Response:
> 
> http://schemas.xmlsoap.org/soap/envelope/";>
> 
> https://adwords.google.com/api/adwords/mcm/v201802"; xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201802";>
> 00056e5a331a8a1b6f439c090121
> 
> CustomerService
> getCustomers
> 1
> 225
> 
> 
> 
> 
> soap:Server
> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED 
> @ ; trigger:'<null>']
> 
> https://adwords.google.com/api/adwords/mcm/v201802"; xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201802";>
> 
> [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED 
> @ ; trigger:'<null>']
> ApiException
> 
> http://www.w3.org/2001/XMLSchema-instance"; xsi:type=
> "ns2:AuthenticationError">
>     
> <null>
> 
> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED
> AuthenticationError
> 
> CLIENT_CUSTOMER_ID_IS_REQUIRED
> 
> 
> 
> 
> 
> 
> 
>
>
>
> Dne pátek 8. června 2018 19:43:41 UTC+2 James Andrews napsal(a):
>>
>> Our software has been working for months with no issues, tonight suddenly 
>> all of our Adwords tokens throw this error.
>>
>> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED
>>
>> Is something broken?  Is there a place we can go to see what the status 
>> of an API is if there are problems?
>>
>> Thanks,
>> James
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fe9e8e7e-6417-4ec7-bd0f-0f44e7765807%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-09 Thread James Andrews
This has been happening sporadically, and just happened again for two of 
our client accounts.  When I see the error I go in and manually test the 
problem (with the same php code) and the error doesn't happen.

James



On Saturday, June 9, 2018 at 2:43:41 AM UTC+9, James Andrews wrote:
>
> Our software has been working for months with no issues, tonight suddenly 
> all of our Adwords tokens throw this error.
>
> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED
>
> Is something broken?  Is there a place we can go to see what the status of 
> an API is if there are problems?
>
> Thanks,
> James
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b5566f8c-b415-4b2a-bc31-add6129059c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-08 Thread James Andrews
Hello Sai,

Yes I have read the documentation I know what it means.  As I stated the error 
started without any code changes.  It was doing this for multiple accounts that 
we manage.  It was not just this one account.  The problem has since gone away, 
so I don’t know what the deal was, but it seems like it was an issue with the 
API and not with anything I was doing.

James



> On Jun 9, 2018, at 6:44 AM, 'Teja Makani' via AdWords API and Google Ads API 
> Forum  wrote:
> 
> Hello James,
> 
> AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED 
> 
>  means Client customer ID was not specified in the HTTP header. Could you 
> please confirm that the file from where you are reading the client customer 
> id is still valid and that, the field has not been commented out? Also, if 
> using java, are you getting this error when you run GetCampaigns.java 
> ?
>  For other programming languages, please refer here 
> .
> 
> Regards,
> Sai Teja, AdWords API Team.
> 
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog:
> https://googleadsdeveloper.blogspot.com/ 
> 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>  
> You received this message because you are subscribed to the Google
> Groups "AdWords API and Google Ads 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 a topic in the Google 
> Groups "AdWords API and Google Ads API Forum" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/adwords-api/4-ZyhkTQDnI/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> adwords-api+unsubscr...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/adwords-api 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/373e9aa8-e60e-43d7-ab39-a74c5c39f48d%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/E9C67989-DC36-4CC4-A77F-58590B656A28%40openbridge.com.
For more options, visit https://groups.google.com/d/optout.


Suddenly getting AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

2018-06-08 Thread James Andrews
Our software has been working for months with no issues, tonight suddenly 
all of our Adwords tokens throw this error.

AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED

Is something broken?  Is there a place we can go to see what the status of 
an API is if there are problems?

Thanks,
James

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/92865c86-2b32-47d7-b533-7a1fe66b0cd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting account info without refresh token on second "authorization" request.

2017-05-11 Thread James Andrews
Thank you!  That totally did the trick!

Thanks
James


On Friday, May 12, 2017 at 5:18:13 AM UTC+9, Shwetha Vastrad (AdWords API 
Team) wrote:
>
> Hi James, 
>
> If you are using Installed application flow 
> , 
> the refresh tokens are always returned. You can prompt the user to 
> re-authorize your app by adding the prompt=consent parameter to the 
> authentication 
> request 
> .
>  
> When prompt=consent is included, the consent screen is displayed every time 
> the user logs into your app and a refresh token is returned in the 
> response. You can consider using CustomerService.getCustomers() 
> 
>  without 
> setting the clientCustomerId to retrieve the details of the authenticated 
> account when users reauthorize. 
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/38e02908-63b3-440e-ae02-94d0fea1c9fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Repeated authorization code

2017-05-11 Thread James Andrews
Warren,

You can only use the authorization code once.  It's one and done.  After 
the code has been used you need to generate a new authorization code.

James

On Friday, May 12, 2017 at 4:50:10 AM UTC+9, Warren Zhang wrote:
>
> Hi,
>
> We've gotten the following exception when trying to generate a token:
>
> {"error" : "invalid_grant", "error_description" : "Code was already 
> redeemed."}
>
>
> Every time we make a request, we're directly using the authentication code 
> passed via the request sent to our callback. We've seen this error occur 3 
> times for a single user within about 12 minutes. The user successfully used 
> this same authorization code about 2 hours before these failures. Could we 
> get some assistance in troubleshooting this issue?
>
> Thanks,
> Warren
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b62179ab-8a34-4af5-85d0-658831b1bcb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Getting account info without refresh token on second "authorization" request.

2017-05-11 Thread James Andrews
Scenario

User logs into account on our website, clicks on an adwords product they 
want to by, they grant us authorization to use their account and we store 
all their tokens and other data in our system to use.

Weeks later they choose another adwords product and instead of clicking on 
the saved account we already have stored they click on the link to 
authorize (we allow this so they can link multiple adwords accounts).  They 
however choose the account they already authorized.  They go through the 
authorization process again.  Their token this time does not have a refresh 
token associated with it so currently we throw an error at them saying they 
have already authorized.

The problem.  Say said our customer has 10 different adwords accounts for 
whatever reason.  They don't understand which ones they've already 
authorized.  What we would like to be able to do is when they authorize the 
second time get some basic account information that we can use to find 
their already stored tokens based on an ID.

We can do this with EVERY other google API.  When a customer re-authorizes 
accidentally we get an access token which gives us the ability to get the 
google userId so we can look it up in our database and find their token if 
the refresh_token is no present.

How can I do this with Adwords API?

James



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d00891c8-13c7-4985-9070-b6f813d9fcb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ClientCustomerId returns empty on AdwordsUser object

2017-04-24 Thread James Andrews
Hi Shwetha,

OK, so if I call getCustomers() with the oauth credentials the return is an 
array, but it sounds like you're saying that the array will only ever have 
1 node and that will be the customer associated with the oauth credentials. 
 If that's the case then I think i am set, please confirm that is the case.

The ManagedCustomerService is what we are doing now, so glad that hasn't 
changed.

Thanks,
James


On Tuesday, April 25, 2017 at 3:35:28 AM UTC+9, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> Hi James, 
>
> Assuming you have the OAuth2 credentials of the user for whom you need to 
> retrieve the AdWords account details, you need to use 
> CustomerService.getCustomers() 
> 
>  method 
> without setting the clientCustomerId 
> 
>  header 
> along with the credentials generated. The response will contain the details 
> of all AdWords accounts associated with the authenticated Google account.
>
> Please note that you'll only be able to get the AdWords account which can 
> be directly accessible by this user. If the user has access to a manager 
> account and you would like to retrieve the client accounts linked to this 
> manager, you need to use ManagedCustomerService 
> 
>  as 
> shown in this example 
> 
> . 
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/700b3713-278b-4d6e-b61c-7604998d957a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ClientCustomerId returns empty on AdwordsUser object

2017-04-24 Thread James Andrews
I hadn't seen the notice for update, so that's something I guess I need to 
work on.

The question is then, is there a way to get the customer information on the 
owner of the access token with the new api?

I'll explain why I need it.  We don't and never have used an INI file.  We 
pull data for many clients.  They log into our website and create what we 
call a "remote identity"  which is basically a collection of  tokens for 
various APIs (Google, Adwords, Facebook, Instagram) etc...  

Part of the primary table for remote identities we store the remote api's 
userId, and identifying name so when customer goes to use their remote 
identity on one of our products they can easily select the right one and 
then when they can choose what adwords "customer" they want to associate 
with their order from that remote identity.  If we can't get access to this 
data then it means our process which was written generically to accommodate 
all oauth APIs now needs to be hacked for the special case of adwords.

Thanks,
James


On Tuesday, April 25, 2017 at 12:01:02 AM UTC+9, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> Hi James, 
>
> If you haven't set the clientCustomerId in your auth.ini file, then you'll 
> not be able to retrieve it from the AdWordsUser object. To use the 
> CustomerService to retrieve the AdWords account associated with the 
> authenticated user, you need to use the getCustomers 
> 
>  method 
> as shown here 
> .
>  
> If the authenticated user is linked to just one AdWords account, then the 
> response will contain the details of that customer. If a clientCustomerId 
> is specified in the request header, only details of that customer will be 
> returned. If no clientCustomerId is specified in a request, the response 
> will contain multiple entries if more than one account is directly 
> accessible by the authenticated user. 
>
> On another note, in December 2016, we announced 
> 
>  the 
> stable release of the new ads PHP library and the deprecation of the old 
> one. The new PHP library has many improvements such as support of 
> namespaces and Composer  installation. The 
> AdwordsUser 
> 
>  which 
> was used to configure the AdWords settings is now replaced by the 
> AdWordsSessionBuilder 
> .
>  
> Please see the upgrading guide 
>  for 
> more details. 
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0a1edf19-46b9-42c2-8907-659080329e5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ClientCustomerId returns empty on AdwordsUser object

2017-04-24 Thread James Andrews
I should point out that $this->user is an AdwordsUser object.

On Monday, April 24, 2017 at 10:00:21 PM UTC+9, James Andrews wrote:
>
> Last week I noticed that there was a change to the php Adwords API library.
>
> Previously when we authenticated a user I would use:
>
> $customerService = $this->user->GetService("CustomerService");
> $customer = $customerService->get();
>
> To get the customer associated with the user who granted us the oauth 
> token.  According to the link below that has changed.
>
>
> https://github.com/googleads/googleads-php-lib/blob/master/src/Google/AdsApi/AdWords/v201702/mcm/CustomerService.php#L83-L85
>
> I looked around and found the GetClientCustomerId object on the 
> AdwordsUser object.  However when I try to run it it returns as empty.  My 
> only thought is that if I list out all the customers I only have one, which 
> is correct, so I am wonder if this returns empty if there is only one 
> customer associated with the account.
>
> Any help on what I am doing wrong would be appreciated.
>
>
>
>
>
>
>
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b7ac006a-7189-4b85-8041-a012cb3b6b17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ClientCustomerId returns empty on AdwordsUser object

2017-04-24 Thread James Andrews
Last week I noticed that there was a change to the php Adwords API library.

Previously when we authenticated a user I would use:

$customerService = $this->user->GetService("CustomerService");
$customer = $customerService->get();

To get the customer associated with the user who granted us the oauth 
token.  According to the link below that has changed.

https://github.com/googleads/googleads-php-lib/blob/master/src/Google/AdsApi/AdWords/v201702/mcm/CustomerService.php#L83-L85

I looked around and found the GetClientCustomerId object on the AdwordsUser 
object.  However when I try to run it it returns as empty.  My only thought 
is that if I list out all the customers I only have one, which is correct, 
so I am wonder if this returns empty if there is only one customer 
associated with the account.

Any help on what I am doing wrong would be appreciated.









-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5bbb56a7-2b53-40ae-b1f4-f35b3c69a8b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Suddenly getting AuthorizationError.USER_PERMISSION_DENIED

2016-06-27 Thread James Andrews
We have a few accounts set up as Manager accounts that we use for testing 
in development.  We were going through testing as we are doing a major 
update to the framework our code use when suddenly we were 
getting AuthorizationError.USER_PERMISSION_DENIED errors return to us upon 
authorization.  We looked at the accounts and they seem to be fine.  I am 
at a loss as to how to debug this issue.

This happens when we try to call

$customerService = $this->user->GetService("CustomerService");
$customer = $customerService->get();

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a39b396d-c01f-4159-aa27-bc65e4094d27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Programmatically Revoke OAuth Token

2016-05-11 Thread James Andrews
Hi Josh,

That’s the problem if Google gives us a valid refresh token, unless it is 
expired/revoked when the user is brought through the re-authentication problem 
no additional refresh token is provided.  Thank you for confirming that the 
library currently does not revoke access.  The issue you linked to mentions a 
“beta” can you link to that or tell me more about that, so I can see if maybe 
we can use that instead with the Google Auth library?

Thanks,
James


> On May 11, 2016, at 2:55 PM, 'Josh Radcliff (AdWords API Team)' via AdWords 
> API Forum  wrote:
> 
> Hi James,
> 
> You are correct that the current Ads PHP library does not support revoking a 
> refresh token. We are in the process of rolling out a new and improved 
> library that uses the Google Auth PHP library -- please see the related issue 
> on github <https://github.com/googleads/googleads-php-lib/issues/115>.
> 
> For your use case, instead of revoking the refresh token when you find that 
> it does not provide access to the user's account, could you simply discard 
> the stored refresh token for that user, then redirect them through your OAuth 
> flow and store the newly acquired token?
> 
> Thanks,
> Josh, AdWords API Team
> 
> On Tuesday, May 10, 2016 at 8:48:17 PM UTC-4, James Andrews wrote:
> This is not for a web application, and $client->revokeToken() does not exist 
> in the php library for Adwords like it does for the standard Google API. 
> 
> These are the 2 classes that are used for handling Oauth2 for Adwords API
> 
> https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/OAuth2Handler.php
>  
> <https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/OAuth2Handler.php>
> 
> https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php
>  
> <https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php>
> 
> Neither of them have a revoke function in them.  What you are suggesting does 
> not work with what we are using, as I stated before I started out trying to 
> use refresh/access tokens from GoogleAPI Oauth, and it didn’t work I had to 
> use the Google Adwords API to initiate Oauth.
> 
> Please escalate this issue because apparently you don’t know the answer and 
> aren’t reading completely what I’ve said in the past 2 emails and I don’t 
> need to go back and forth over and over to get an answer for the Google 
> Adwords API.
> 
> James
> 
> 
>> On May 10, 2016, at 5:22 PM, 'Shwetha Vastrad (AdWords API Team)' via 
>> AdWords API Forum > <mailto:adwords-api@googlegroups.com>> wrote:
>> 
>> Hi James,
>> 
>> If the OAuth2.0 credentials you have are for a Web application, then the 
>> refresh token can be revoked programmatically 
>> <https://developers.google.com/identity/protocols/OAuth2WebServer#offline> 
>> by calling "$client->revokeToken()". For installed applications, you could 
>> use below code to revoke the token using C# client library.
>> 
>> AdsOAuthProviderForApplications oAuth2Provider =  (user.OAuthProvider as 
>> AdsOAuthProviderForApplications);
>> oAuth2Provider.RevokeRefreshToken();
>> 
>> Unfortunately, a similar option is not available in the PHP library for 
>> installed applications.
>> 
>> Regards,
>> Shwetha, AdWords API Team.
>> 
>> -- 
>> -- 
>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>> Also find us on our blog and Google+:
>> https://googleadsdeveloper.blogspot.com/ 
>> <https://googleadsdeveloper.blogspot.com/>
>> https://plus.google.com/+GoogleAdsDevelopers/posts 
>> <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 
>> <mailto:adwords-api@googlegroups.com>
>> To unsubscribe from this group, send email to
>> adwords-api+unsubscr...@googlegroups.com 
>> <mailto:adwords-api+unsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/adwords-api?hl=en 
>> <http://groups.google.com/group/adwords-api?hl=en>
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "AdWords API Forum" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/

Re: Programmatically Revoke OAuth Token

2016-05-10 Thread James Andrews
This is not for a web application, and $client->revokeToken() does not exist in 
the php library for Adwords like it does for the standard Google API. 

These are the 2 classes that are used for handling Oauth2 for Adwords API

https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/OAuth2Handler.php
 


https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php
 


Neither of them have a revoke function in them.  What you are suggesting does 
not work with what we are using, as I stated before I started out trying to use 
refresh/access tokens from GoogleAPI Oauth, and it didn’t work I had to use the 
Google Adwords API to initiate Oauth.

Please escalate this issue because apparently you don’t know the answer and 
aren’t reading completely what I’ve said in the past 2 emails and I don’t need 
to go back and forth over and over to get an answer for the Google Adwords API.

James


> On May 10, 2016, at 5:22 PM, 'Shwetha Vastrad (AdWords API Team)' via AdWords 
> API Forum  wrote:
> 
> Hi James,
> 
> If the OAuth2.0 credentials you have are for a Web application, then the 
> refresh token can be revoked programmatically 
>  by 
> calling "$client->revokeToken()". For installed applications, you could use 
> below code to revoke the token using C# client library.
> 
> AdsOAuthProviderForApplications oAuth2Provider =  (user.OAuthProvider as 
> AdsOAuthProviderForApplications);
> oAuth2Provider.RevokeRefreshToken();
> 
> Unfortunately, a similar option is not available in the PHP library for 
> installed applications.
> 
> Regards,
> Shwetha, AdWords API Team.
> 
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 a topic in the Google 
> Groups "AdWords API Forum" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/adwords-api/4WNjPTkF7Cw/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> adwords-api+unsubscr...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/adwords-api 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/04265b91-82b8-455d-9d96-b3709792321a%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/FA879531-378B-41B5-9434-83B56BEC2898%40openbridge.com.
For more options, visit https://groups.google.com/d/optout.


Re: Programmatically Revoke OAuth Token

2016-05-10 Thread James Andrews
Shwetha,

6 months ago when we started working with Adwords API I had tried using the 
Google API to generate my access/refresh tokens as we do with other Google 
products.  This did not work however when we were trying to connect with 
Adwords.  We resorted to having to use the Adwords API code in order to 
generate our access/refresh tokens.   While use the refresh token may be 
associated with the account it is generated with the Adwords PHP API which is 
why I am asking the question here, because I know how to revoke the token using 
the Google API.

Yes, I realize revoking the tokens won’t fix the overall problem, but when a 
customer authenticates we only want to save their tokens when the account is 
properly linked to the Adwords Manager Account.  If we don’t revoke access, 
then the next time we bring them to the authorization page we’ll be handed a 
access token but no refresh token and that won’t work because we do things 
offline and require the refresh token.  

So i will ask again.   Is there a way for us to programmatically revoke the 
user’s tokens with the AdwordsAPI like you can with the regular Google API? Yes 
or no, if yes then how.

Thanks,
James



> On May 10, 2016, at 1:49 PM, 'Shwetha Vastrad (AdWords API Team)' via AdWords 
> API Forum  wrote:
> 
> Hi James,
> 
> The refresh token is associated with the Google account in general and is not 
> specific to AdWords. You can revoke access by visiting Account Settings 
> . But in this 
> scenario, revoking the refresh token will not help as it is tied to the 
> AdWords Manager account. You'll still be able to get a valid refresh token, 
> but encounter the USER_PERMISSION_DENIED 
> 
>  authorization error when you try to make API requests against the linked 
> AdWords account.
> 
> I would suggest that you redo the process of granting access 
>  so that the manager 
> account has the required permissions.
> 
> Regards,
> Shwetha, AdWords API Team.
> 
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 a topic in the Google 
> Groups "AdWords API Forum" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/adwords-api/4WNjPTkF7Cw/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> adwords-api+unsubscr...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/adwords-api 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/28f96cac-af23-448f-aeec-1600064cbea0%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/DF2C5788-E43C-4685-BFF1-F4C1B1666594%40openbridge.com.
For more options, visit https://groups.google

Programmatically Revoke OAuth Token

2016-05-10 Thread James Andrews
I have a situation where a client has an Adwords manager that is linked to 
another Adwords account but has not been granted permission by that user. 
 When they go to authenticate we are thrown an exception that permission is 
not granted, but because Oauth is not tied to this 2nd call their Oauth 
tokens are valid.  I want to revoke this token so they can come back and go 
through the process again when they have been granted permission, yet I see 
no way to revoke even though in the regular Google API there is a 
revokeToken() function in the "Client" object.   Does Adwords not have this?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7e9ea870-f5b7-42ac-9538-3ee85427f80f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to tell if an account is MCC or non-MCC (client)

2016-01-06 Thread James Andrews
Hello Yin,

I'm working with Lena and we're using php not python.  From looking at what 
you provide I believe it coded correctly in php.  This is what we have.

// Function to get the adwords user from credentials
$user = $this->getAdwordsUser($account, $params);

// Get the adwords customer
$customerService = $user->GetService("CustomerService");
$customer = $customerService->get();

$user->SetClientCustomerId($customer->customerId);

$customerService = $user->GetService("CustomerService");
$customer = $customerService->get();

$managedCustomerService = 
$user->GetService('ManagedCustomerService', ADWORDS_VERSION);
// Create selector.
$selector = new \Selector();
// Specify the fields to retrieve.
$selector->fields = array('CustomerId', 'Name', 'CanManageClients');
// Make the get request.
$managedCustomerPage = $managedCustomerService->get($selector);

Does this look right?  Can you see anything we are doing incorrectly?

Thanks,
James

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/56467a41-92ea-4c1c-9954-5a353375e0f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Refreshing a Token with php api

2015-12-22 Thread James Andrews
Doh!  Thanks Yin.  That’s what I get for copying code from another Google App.  
 

Thanks
James  


> On Dec 23, 2015, at 5:39 AM, Yin Niu  wrote:
> 
> Hi James, 
> 
> This error means you are using a different client ID than the one that the 
> refresh token was generated with.
> 
> 
> Thanks,
> Yin, AdWords API Team. 
> 
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 a topic in the Google 
> Groups "AdWords API Forum" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/adwords-api/d-PDntg9BtI/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> adwords-api+unsubscr...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/adwords-api 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/cc9c9ac7-1c29-43be-ad25-63a871dcfebb%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/75541CE0-25EC-4C36-AE66-4D8E04ACEE00%40openbridge.com.
For more options, visit https://groups.google.com/d/optout.


Refreshing a Token with php api

2015-12-22 Thread James Andrews
I've been poking through the API and have found various functions in 
different places that look like they are involved in refreshing tokens. 
 Nothing I am doing is working.

My code as follows

// oauth 2 config
$credentials= array(
  'client_id' => $config['id'],
  'client_secret' => $config['secret'],
  'access_token' => $params['access_token'],
  'refresh_token' => $params['refresh_token']
);

$user = new \AdWordsUser(null, $adwords['dev_token'], 
$adwords['useragent'], null, null, $credentials);

$handler = $user->GetOAuth2Handler();
$oauth2Info = 
$handler->RefreshAccessToken($user->GetOAuth2Info());
$user->SetOAuth2Info($oauth2Info);

Using this code here I would expect that the access token would get 
refreshed.  If I try to make any call after it however I get 

{\n \"error\" : \"unauthorized_client\"\n}

Thoughts?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1ba789df-bfd3-4a6f-b3ec-e87247ed9a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to pass parameters through oauth.

2015-12-21 Thread James Andrews
Man I'm an idiot.  I was doing &state= on the wrong URL and Google yelled 
at me.  Now I know why.  My bad nothing to see here.

On Tuesday, December 22, 2015 at 1:22:09 AM UTC+9, James Andrews wrote:
>
> Hello,
>
> Our application requires me to pass 3 parameters through auth that get 
> processed on the return.  Using the Google API for Youtube I am able to use 
> the setState function and pass a base64 encoded string as the state.  I am 
> trying to figure out how I would do that with the Adwords API, but I do not 
> see it as part of the php library.  Can anyone point me in the right 
> direction?
>
> Thanks,
> James
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/79a2d5b9-0aca-4fa2-85e9-bd4dae1709ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to pass parameters through oauth.

2015-12-21 Thread James Andrews
Hello,

Our application requires me to pass 3 parameters through auth that get 
processed on the return.  Using the Google API for Youtube I am able to use 
the setState function and pass a base64 encoded string as the state.  I am 
trying to figure out how I would do that with the Adwords API, but I do not 
see it as part of the php library.  Can anyone point me in the right 
direction?

Thanks,
James

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0d926ccc-6993-4f68-b5be-991acf92f0eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PHP invalid_grant via oauth? Can someone help me figure out what I am doing wrong?

2015-12-18 Thread James Andrews
Hello Michael,

I was able to get a valid access/refresh token pair using the GoogleLeads api 
code and return data from.  In comparing the tokens returned by Adwords and a 
token returned by the GoogleAPI they are drastically different in string 
length.   Therefore I conclude they are not the same and that we’ll have to 
give users a new way to authenticate for adwords.

While I have someone’s attention.  Can I point out that this would have been 
less painful if somewhere in the documentation it stated that AdwordsAPI Oauth 
was not the same as the GoogleAPI Oauth.

Thanks for the help,
James

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/C40FFDCB-BD37-499B-A6F3-423AE3B6BB4B%40openbridge.com.
For more options, visit https://groups.google.com/d/optout.


Re: PHP invalid_grant via oauth? Can someone help me figure out what I am doing wrong?

2015-12-17 Thread James Andrews
Yin,

I'm not trying to be a jerk here, but did you even read my 2 posts where I 
have told you my company has been using the google APIs for 2 years with 
oauth.  We have this working in a production environment.  The issue is 
tokens created with the system we have set up are not working with adwords 
API.  I am really frustrated that 1) you didn't give me a direct answer to 
the questions I had in my 2nd post.  and 2) you aren't paying attention to 
what I've written in both my previous posts.  If you had read either of 
them you would have sen that the answer to your question is yes.  

James

On Thursday, December 17, 2015 at 11:54:13 PM UTC+9, Yin Niu wrote:
>
> Hi James, 
>
> Have you followed the OAuth guide for web application with a web flow 
> ? If 
> you need offline access 
> , 
> you need to set your access type to "offline". You can also try the OAuth 
> Playground 
>  to 
> generate refresh token. 
>
> Thanks,
> Yin, AdWords API Team. 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8e92da95-f4af-4e15-a943-ce51b2e569e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PHP invalid_grant via oauth? Can someone help me figure out what I am doing wrong?

2015-12-16 Thread James Andrews
Hello Yin,

I've been using Google APIs for 2 years, with code already created to get 
google Access tokens and Refresh tokens.  Are you telling me that Adwords 
does not work with the standard Google API Oauth system and I have to 
integrate another method of getting refresh tokens in order to use the 
Adwords API? 

I had mentioned in my original message that we work with Google APIs in 
general.  Youtube, DFA etc... so we are aware that we are only allowed 25 
refresh tokens.  We use 1 with our other api calls so that's not the 
problem.  Server is NTP enabled we ran into that issue when we were dealing 
with Instagram, so that's not it.

James


On Thursday, December 17, 2015 at 2:08:14 AM UTC+9, Yin Niu wrote:
>
> Hi James, 
>
> Have you followed this instruction 
> 
>  to 
> generate refresh token using an MCC account?  
>
> Other things you can check are: 
>
> 1. Make sure your server's clock is in sync with NTP. 
> 2. There is a maximum of 25 refresh tokens that can be valid at a time. 
> If someone gets a 26th refresh token, then the 1st refresh token becomes 
> invalid.
>
> Thanks,
> Yin, AdWords API Team. 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/036201ca-94ef-42ba-8e8d-f187c57a374f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


PHP invalid_grant via oauth? Can someone help me figure out what I am doing wrong?

2015-12-16 Thread James Andrews
My Company has a Google Application that we use for connecting to various 
Google APIs (Youtube, DFA... etc) via OAuth.  Today I am trying to 
integrate Adwords into this application and am only getting the error 
"invalid_grant".   I have looked through the "Enabled APIs" and see no way 
to enable Adwords to an application specifically.  I suspect that is done 
through the developer token.  The user's token is new created after we were 
granted permission to use the API in a production environment.  Our 
application type is a "Web Application" type.  and when we create tokens we 
create them for use Offline.  I also made sure to add the users's adwords 
ID to the manager account so the developer key has access to the user's 
adwords account.

This is the code snippet I am using.  It is pretty much straight out of the 
example documentation, with minor mods to get oauth creds from the 
configuration file.

Can someone please point me in the right direction.

protected function getCustomer($account, $params)
{
try {
  
// Retrieve the client_id and client_secret
$config = $this->container->getParameter('google_app');

// Get dev_token and user_agent
$adwords = $this->container->getParameter('google_adwords');

// oauth 2 config
$oauth2Info = array(
  'client_id' => $config['id'],
  'client_secret' => $config['secret'],
  'refresh_token' => $params['refresh_token']
);

$user = new \AdWordsUser(null, $adwords['dev_token'], 
$adwords['user_agent'], null, null, $oauth2Info);

// Get the adwords customer
$customerService = $user->GetService("CustomerService");
$customer = $customerService->get();
$customerInfoArray = array();
$customerService = $user->GetService("CustomerService");
$customer = $customerService->get();

print_r($customer);

exit();

// return $customer;

} catch (OAuth2Exception $e) {
  throw new \Exception("ERROR_OAUTH_AUTHORIZATION_FAILURE", 500);
} catch (ValidationException $e) {
  throw new \Exception("ERROR_OAUTH_AUTHORIZATION_FAILURE", 500);
} catch (Exception $e) {
  throw new \Exception("ERROR_UNEXPECTED_FAILURE", 500);
}
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b358e9ce-d1a6-4585-9da1-a2cc5248fee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.