Re: Policy violations - v201710 vs 201706

2018-07-27 Thread GregT
Great - thank you both for clearing things up!

Greg

On Friday, July 27, 2018 at 12:17:10 PM UTC-5, Anash P. Oommen (AdWords API 
Team) wrote:
>
> Hi Greg,
>
> Since Josh is not available, I'll answer your questions instead.
>
> 1. Yes, ETA won't produce any PolicyViolationError. Let me know if you see 
> any behaviour otherwise, and we will investigate on priority.
> 2. PolicyFindingErrors (and policies in general) are a lot dependent on 
> the account in which the ad serves, the geographies for which the ad 
> serves, the network, whether we've seen a lot of these errors (and 
> violations) in the past, etc. The test accounts are meant for minimal 
> replication of policy errors; it doesn't support all combinations of 
> PolicyViolationErrors you'd see in production accounts. My suggestion is to 
> design your application such that you can test and verify for minimal 
> PolicyViolationErrors against test accounts, and be able to specify 
> additional policies as runtime-configurable.
>
> Cheers
> Anash P. Oommen,
> AdWords API Advisor.
>
> On Friday, July 27, 2018 at 12:24:14 PM UTC-4, GregT wrote:
>>
>> Hey, Josh.
>>
>> Thanks for looking into this and for the information. I'd just like to 
>> clarify some things.  
>>
>> 1 - Are you saying that creating expanded text ads will now *never* produce 
>> a PolicyViolationError, and we should only be looking for 
>> PolicyFindingErrors? It seems pretty clear that that's what you (& the 
>> documentation you pasted) are saying, but I just want to double check, as 
>> it seems like that means for expanded text ads, there's really not 
>> exemptable vs. non-exemptable anymore, and there's just a single type of 
>> "exemptable but your request will be denied" violation.
>>
>> 2 - As I mentioned in my original July 3 post, I tried to produce (in the 
>> sandbox with v201806) policy violations by using things that are direct 
>> violations of what's given in the advertising policies page you mentioned 
>> (like "work @home", "big big SALE", "FR33 ShiPPiNG", "buy hunting rifle", 
>> various brand names that produce trademark violations in production, etc.), 
>> and these are accepted by the sandbox without issue, although production 
>> v201802 produces policy violations. As I mentioned, the only thing I can 
>> get to produce a policy violation (the new PolicyFindingError) in the 
>> sandbox for v201806 expanded text ads is multiple exclamation points in a 
>> row. Is this expected (it seems like it wouldn't be, considering you 
>> pointed to the advertising policies page for examples of ad text that 
>> should trigger errors)? I guess, in reality, if the answer to #1 above is 
>> yes, then since I can produce that error with multiple exclamation points, 
>> this question is irrelevant, although it seems odd. 
>>
>> Thanks,
>> Greg
>>
>> On Thursday, July 26, 2018 at 4:35:39 PM UTC-5, Josh Radcliff (AdWords 
>> API Team) wrote:
>>>
>>> Hi Greg,
>>>
>>> I ran some tests and spoke with my colleagues today. Starting with 
>>> v201806, some ad types will return a *PolicyFindingError* *instead of* a 
>>> *PolicyViolationError* when there are policy issues. Here's the note we 
>>> added to the Policy Exemption Requests guide 
>>>  
>>> for 
>>> the v201806 release (yellow highlights mine):
>>>
>>> *Note:* Starting in v201806, some ad types (including ExpandedTextAd 
>>> )
>>>  
>>> will fail with a PolicyFindingError 
>>> 
>>>  instead. This new type of error indicates that the ad will certainly 
>>> fail review again even if an exemption is requested. You can save these ads 
>>> anyway by using the ignorablePolicyTopicIds 
>>> 
>>>  field. 
>>> They will fail review, but could be approved later if you fix the 
>>> underlying issue, for example by getting the correct certificate.
>>>
>>> Therefore, if you're looking to handle errors specifically for 
>>> *ExpandedTextAds*, you'll want to:
>>>
>>>1. Modify your error handling to instead check for 
>>>*PolicyFindingError*.
>>>2. If you want to resubmit an operation even though it's likely to 
>>>wind up with policy errors, collect all of the policyTopicIds 
>>>
>>> 
>>>  from 
>>>the error's policyTopicEntries 
>>>
>>> ,
>>>  
>>>add those IDs to the operation's ignorablePolicyTopicIds 
>>>
>>> 

Re: How to stop results splitting by Campaign

2018-07-27 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Andrew,

Could you please confirm are you looking to fetch impression share stats 
aggregated by campaign level? If yes, you can contentimpressionshare 

 
and searchimpressionshare 

 
attribute of the Campaign Performance report 
.
 
If this does not answer your question, could you please share the report 
definition along with client customer id so that I can troubleshoot 
further? You could choose 'Reply privately to author' option while 
responding.

Thanks,
Milind, 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 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/9f2f2b5a-1abe-406b-b710-d70f224276ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: adwords managed from thrid parties software via API

2018-07-27 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Eliel,

>From the AdWords API perspective, you can add the account under your 
manager account using ManagedCustomerService.mutate 

 API 
call. You can refer Java sample code here 
.
 
Samples in other languages can be found here 
. The 
question related to Google Engine and managing the amount of money to 
invest in your site as also indexed and promoted in Google, are out of 
scope for this forum as we discuss technical issues about AdWords API here. 
You could post your concern on Google community forum 
.
 
If you have any specific questions about AdWords API, please let me know.

Thanks,
Milind, 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 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/16e99827-25d8-453c-8e54-9362f668b1d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Policy violations - v201710 vs 201706

2018-07-27 Thread 'Anash P. Oommen (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Greg,

Since Josh is not available, I'll answer your questions instead.

1. Yes, ETA won't produce any PolicyViolationError. Let me know if you see 
any behaviour otherwise, and we will investigate on priority.
2. PolicyFindingErrors (and policies in general) are a lot dependent on the 
account in which the ad serves, the geographies for which the ad serves, 
the network, whether we've seen a lot of these errors (and violations) in 
the past, etc. The test accounts are meant for minimal replication of 
policy errors; it doesn't support all combinations of PolicyViolationErrors 
you'd see in production accounts. My suggestion is to design your 
application such that you can test and verify for minimal 
PolicyViolationErrors against test accounts, and be able to specify 
additional policies as runtime-configurable.

Cheers
Anash P. Oommen,
AdWords API Advisor.

On Friday, July 27, 2018 at 12:24:14 PM UTC-4, GregT wrote:
>
> Hey, Josh.
>
> Thanks for looking into this and for the information. I'd just like to 
> clarify some things.  
>
> 1 - Are you saying that creating expanded text ads will now *never* produce 
> a PolicyViolationError, and we should only be looking for 
> PolicyFindingErrors? It seems pretty clear that that's what you (& the 
> documentation you pasted) are saying, but I just want to double check, as 
> it seems like that means for expanded text ads, there's really not 
> exemptable vs. non-exemptable anymore, and there's just a single type of 
> "exemptable but your request will be denied" violation.
>
> 2 - As I mentioned in my original July 3 post, I tried to produce (in the 
> sandbox with v201806) policy violations by using things that are direct 
> violations of what's given in the advertising policies page you mentioned 
> (like "work @home", "big big SALE", "FR33 ShiPPiNG", "buy hunting rifle", 
> various brand names that produce trademark violations in production, etc.), 
> and these are accepted by the sandbox without issue, although production 
> v201802 produces policy violations. As I mentioned, the only thing I can 
> get to produce a policy violation (the new PolicyFindingError) in the 
> sandbox for v201806 expanded text ads is multiple exclamation points in a 
> row. Is this expected (it seems like it wouldn't be, considering you 
> pointed to the advertising policies page for examples of ad text that 
> should trigger errors)? I guess, in reality, if the answer to #1 above is 
> yes, then since I can produce that error with multiple exclamation points, 
> this question is irrelevant, although it seems odd. 
>
> Thanks,
> Greg
>
> On Thursday, July 26, 2018 at 4:35:39 PM UTC-5, Josh Radcliff (AdWords API 
> Team) wrote:
>>
>> Hi Greg,
>>
>> I ran some tests and spoke with my colleagues today. Starting with 
>> v201806, some ad types will return a *PolicyFindingError* *instead of* a 
>> *PolicyViolationError* when there are policy issues. Here's the note we 
>> added to the Policy Exemption Requests guide 
>>  
>> for 
>> the v201806 release (yellow highlights mine):
>>
>> *Note:* Starting in v201806, some ad types (including ExpandedTextAd 
>> )
>>  
>> will fail with a PolicyFindingError 
>> 
>>  instead. This new type of error indicates that the ad will certainly 
>> fail review again even if an exemption is requested. You can save these ads 
>> anyway by using the ignorablePolicyTopicIds 
>> 
>>  field. 
>> They will fail review, but could be approved later if you fix the 
>> underlying issue, for example by getting the correct certificate.
>>
>> Therefore, if you're looking to handle errors specifically for 
>> *ExpandedTextAds*, you'll want to:
>>
>>1. Modify your error handling to instead check for 
>>*PolicyFindingError*.
>>2. If you want to resubmit an operation even though it's likely to 
>>wind up with policy errors, collect all of the policyTopicIds 
>>
>> 
>>  from 
>>the error's policyTopicEntries 
>>
>> ,
>>  
>>add those IDs to the operation's ignorablePolicyTopicIds 
>>
>> ,
>>  
>>then resubmit the operation.
>>
>> You can see examples of ad text that will trigger these errors in this 
>> Advertising Policies Help page 
>> 

Re: CAMPAIGN_PERFORMANCE_REPORT filter by Labels (strings)

2018-07-27 Thread 'Kristijan Novakovic' via AdWords API and Google Ads API Forum
Thanks for the answer and for the feature request. In the meanwhile, I will 
try the Label Report.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3358f8c2-de8f-4e53-b789-b72bc4b6acec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Policy violations - v201710 vs 201706

2018-07-27 Thread GregT
Hey, Josh.

Thanks for looking into this and for the information. I'd just like to 
clarify some things.  

1 - Are you saying that creating expanded text ads will now *never* produce 
a PolicyViolationError, and we should only be looking for 
PolicyFindingErrors? It seems pretty clear that that's what you (& the 
documentation you pasted) are saying, but I just want to double check, as 
it seems like that means for expanded text ads, there's really not 
exemptable vs. non-exemptable anymore, and there's just a single type of 
"exemptable but your request will be denied" violation.

2 - As I mentioned in my original July 3 post, I tried to produce (in the 
sandbox with v201806) policy violations by using things that are direct 
violations of what's given in the advertising policies page you mentioned 
(like "work @home", "big big SALE", "FR33 ShiPPiNG", "buy hunting rifle", 
various brand names that produce trademark violations in production, etc.), 
and these are accepted by the sandbox without issue, although production 
v201802 produces policy violations. As I mentioned, the only thing I can 
get to produce a policy violation (the new PolicyFindingError) in the 
sandbox for v201806 expanded text ads is multiple exclamation points in a 
row. Is this expected (it seems like it wouldn't be, considering you 
pointed to the advertising policies page for examples of ad text that 
should trigger errors)? I guess, in reality, if the answer to #1 above is 
yes, then since I can produce that error with multiple exclamation points, 
this question is irrelevant, although it seems odd. 

Thanks,
Greg

On Thursday, July 26, 2018 at 4:35:39 PM UTC-5, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi Greg,
>
> I ran some tests and spoke with my colleagues today. Starting with 
> v201806, some ad types will return a *PolicyFindingError* *instead of* a 
> *PolicyViolationError* when there are policy issues. Here's the note we 
> added to the Policy Exemption Requests guide 
>  
> for 
> the v201806 release (yellow highlights mine):
>
> *Note:* Starting in v201806, some ad types (including ExpandedTextAd 
> )
>  
> will fail with a PolicyFindingError 
> 
>  instead. This new type of error indicates that the ad will certainly 
> fail review again even if an exemption is requested. You can save these ads 
> anyway by using the ignorablePolicyTopicIds 
> 
>  field. 
> They will fail review, but could be approved later if you fix the 
> underlying issue, for example by getting the correct certificate.
>
> Therefore, if you're looking to handle errors specifically for 
> *ExpandedTextAds*, you'll want to:
>
>1. Modify your error handling to instead check for *PolicyFindingError*
>.
>2. If you want to resubmit an operation even though it's likely to 
>wind up with policy errors, collect all of the policyTopicIds 
>
> 
>  from 
>the error's policyTopicEntries 
>
> ,
>  
>add those IDs to the operation's ignorablePolicyTopicIds 
>
> ,
>  
>then resubmit the operation.
>
> You can see examples of ad text that will trigger these errors in this 
> Advertising Policies Help page 
> .
>
> Cheers,
> Josh, AdWords API Team
>
> On Thursday, July 26, 2018 at 11:13:27 AM UTC-4, Josh Radcliff (AdWords 
> API Team) wrote:
>>
>> Hi Greg,
>>
>> Sorry for the delay. I've gathered some information but I need to work 
>> through some of the finer points and run through examples myself in order 
>> to give you a complete answer. Stay tuned!
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Tuesday, July 24, 2018 at 5:11:51 PM UTC-4, GregT wrote:
>>>
>>> Hi, Josh.
>>>
>>> It's been a couple weeks. Just checking in to see if there's any update?
>>>
>>> Thanks,
>>> Greg
>>>
>>> On Friday, July 6, 2018 at 10:07:56 AM UTC-5, Josh Radcliff (AdWords API 
>>> Team) wrote:

 Hi Greg, Peter,

 Thanks for providing such detailed information on this issue. I've 
 passed this on to the policy expert on the engineering team and will let 
 you know as soon as I have an update.

 Cheers,
 Josh, AdWords API Team

 On Tuesday, July 3, 2018 at 11:20:56 AM UTC-4, GregT wrote:
>
> I jus

Re: CAMPAIGN_PERFORMANCE_REPORT filter by Labels (strings)

2018-07-27 Thread 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
Hello, 

In the reports that supports Labels 
,
 
you may only be able to filter using the LabelIds 
.
 
If you are having trouble mapping the label names to the label ids, you 
could use the Label Report 
.
 
This is a structure report and you will be able to filter using the 
LabelName 

 in 
this report. I will raise a feature request to see if filtering based on 
Labels can be enabled in the supported reports. You could keep an eye on 
our blog  for 
updates and announcement about future releases. 

Thanks,
Sreelakshmi, AdWords API Team

On Thursday, July 26, 2018 at 5:20:05 PM UTC-4, Kristijan Novakovic wrote:
>
> Hi,
>
> No, that's not what I want. I want to filter by Label (as in Label Name - 
> String) not by Label IDs. Is that possible?
>
> On Thursday, July 26, 2018 at 10:29:01 PM UTC+2, Sreelakshmi Sasidharan 
> (AdWords API Team) wrote:
>>
>> Hello, 
>>
>> As with other fields of type List, you can filter reporting results by 
>> LabelIds using CONTAINS_ANY, CONTAINS_ALL, or CONTAINS_NONE. You could 
>> check the guide on labels  for more clarity. Please see 
>> a sample AWQL below :
>>
>> SELECT CampaignId, LabelIds, Labels FROM CAMPAIGN_PERFORMANCE_REPORT 
>> WHERE Labels CONTAINS_ANY [926238056]
>>
>> Let me know if you have any additional questions. 
>>
>> Thanks,
>> Sreelakshmi, AdWords API Team
>>
>>
>> On Thursday, July 26, 2018 at 9:34:09 AM UTC-4, Kristijan Novakovic wrote:
>>>
>>> Hello,
>>>
>>> Is it possible to filter data by Labels (string values)? Whenever I try 
>>> to do that I get "Temporary problem with the server. Please retry the 
>>> request after a few moments".
>>> If I insert integers as values to filter by (ids)  then it works ok.
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/9f4ba66a-f8a3-4cb6-a43a-f8b5842fe3f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Link Adwords Account: AuthenticationError.OAUTH_TOKEN_INVALID

2018-07-27 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Duong,

The error OAUTH_TOKEN_INVALID 

 occurs 
when your access token passed with the HTTP header was not correct. To 
verify that your credentials are correct, you could also try the CURL 
request provided below and see if you are able to generate the access 
tokens? If the credentials are correct, you should get an access token for 
the below request.

curl https://www.googleapis.com/oauth2/v4/token \
-d refresh_token=your-refresh_token \
-d client_id=your-client-id \
-d client_secret=your-client-secret \
-d grant_type=refresh_token

If your credentials are incorrect and still facing issues then could you 
generate a new refresh token with the help of this guide 

 and 
retry your request? Also, please make sure that you are authenticating as 
the Manager account 

 while 
making this call. If you are still facing an issue please share the client 
customer id of your AdWords account and manager AdWords account.

Thanks,
Milind, 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 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/1d042e5b-c137-48e5-817f-b3f6b681033a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Batch Jobs failing with inconsistent errors

2018-07-27 Thread 'Michael Cloonan (AdWords API Team)' via AdWords API and Google Ads API Forum
Hello Sanjay,

Could you reply to me privately by choosing "reply privately to author" 
from the drop down at the top-right of my post, and please include:

   - At least one full set of operations that you submitted which resulted 
   in these errors
   - At least one full error message from the response, including the 
   information about which operation it's referring to


This extra context should help me troubleshoot what may have been going 
wrong.

Also, are you still running into this issue now, or are further batch job 
updates you're making working as expected?

Regards,
Mike, AdWords API Team

On Friday, July 27, 2018 at 1:05:01 AM UTC-4, san...@goshift.com wrote:
>
> Hi,
>
> Im wondering if someone can help me. 
>
> A few days ago we submitted a whole load of batch jobs, approximately 470, 
> with each batch containing 300 operations.
>
> Nearly all of them failed and the main two reasons where:
>
> - TEMP_ID_ENTITY_HAD_ERRORS
>
> - OPERATION_NOT_PERMITTED_FOR_REMOVED_ENTITY
>
> When I resubmit the batch job then they are successful. 
>
> Here are some batch job ID's which failed:
>
> 802076682
> 802078998
> 802078290
> 801689216
> 802026511
>
> Could someone please help and advise on why the batch jobs failed with 
> these errors first time yet passed the second time. 
>
> Thanks
> Sanjay
>
>
>
>
>
>
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/ec41caeb-4e32-452a-8d4d-d9042ec9a82c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Link Adwords Account: AuthenticationError.OAUTH_TOKEN_INVALID

2018-07-27 Thread xuantoi . ads . mtest
Hello,
I'm got AuthenticationError.OAUTH_TOKEN_INVALID when try to link adwords 
account to manager adwords account

here my code at server:


private void sendRequest(ManagedCustomerServiceInterface 
managedCustomerService, Long customerId, Long managerId) throws RemoteException 
{
//send email request
LinkOperation linkOp = new LinkOperation();
ManagedCustomerLink link = new ManagedCustomerLink();
link.setClientCustomerId(customerId); //customer id
link.setLinkStatus(LinkStatus.PENDING);
link.setManagerCustomerId(managerId);//manager id
linkOp.setOperand(link);
linkOp.setOperator(Operator.ADD);
managedCustomerService.mutateLink(new LinkOperation[]{linkOp});
log.info("request has been sent!");
}

private void acceptRequest(ManagedCustomerServiceInterface 
managedCustomerService, Long customerId, Long managerId) throws RemoteException 
{
//accept
LinkOperation linkOps = new LinkOperation();
ManagedCustomerLink links = new ManagedCustomerLink();
links.setClientCustomerId(customerId); //customer id
links.setLinkStatus(LinkStatus.ACTIVE);
links.setManagerCustomerId(managerId);//manager id
linkOps.setOperand(links);
linkOps.setOperator(Operator.SET);
managedCustomerService.mutateLink(new LinkOperation[]{linkOps});
log.info("request has been accepted!");
}
private AdWordsSession getSessionByAccessToken(String accessToken) {
AdWordsSession session = null;
try {
GoogleCredential credential = new 
GoogleCredential().setAccessToken(accessToken);
// Construct an AdWordsSession.
session = new AdWordsSession.Builder()
.withDeveloperToken(developerToken)
.withUserAgent("Knorex-adwords")
.withOAuth2Credential(credential)
.build();
} catch (Exception e) {
log.error(e.getMessage());
}
return session;
}

private Long parseLong(String str){
str = str.replaceAll("-","");
return Long.parseLong(str);
}

public String linkAccount(GoogleSignInObject googleSignInObject){
AdWordsSession session = getSession();
AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance();
ManagedCustomerServiceInterface managedCustomerService =
adWordsServices.get(session, ManagedCustomerServiceInterface.class);

Long cusId = parseLong(googleSignInObject.getCustomerId());
Long manId = parseLong(clientCustomer);

try {
sendRequest(managedCustomerService, cusId, manId);
}  catch (ApiException e){
log.error(e.getMessage());

} catch (RemoteException e) {
log.error(e.getMessage());
return FAIL;
}

//change session
GoogleTokenResponse tokenResponse;
try {
tokenResponse = new GoogleAuthorizationCodeTokenRequest(
new NetHttpTransport(),
JacksonFactory.getDefaultInstance(),
"https://www.googleapis.com/oauth2/v4/token";,
googleSignInObject.getClientId(),
googleSignInObject.getClientSecret(),
googleSignInObject.getAuthCode(),
googleSignInObject.getRedirectUri())  // Specify the same 
redirect URI that you use with your web
// app. If you don't have a web version of your app, you can
// specify an empty string.
.execute();
} catch (IOException e) {
log.error(e.getMessage());
return FAIL;
}
String accessToken = tokenResponse.getAccessToken();

session = getSessionByAccessToken(accessToken);
session.setClientCustomerId(googleSignInObject.getCustomerId());

ManagedCustomerServiceInterface managedCustomerService2 =
adWordsServices.get(session, ManagedCustomerServiceInterface.class);
try {
acceptRequest(managedCustomerService2, cusId, manId); //i get error here
} catch (RemoteException e) {
log.error(e.getMessage());
return FAIL;
}
return SUCCESS;
}


controller:

@PostMapping(value = "/link/account", consumes = "application/json; 
charset=UTF-8")
public String link(@RequestBody GoogleSignInObject googleSignInObject){
return manageAccount.linkAccount(googleSignInObject);
}


font-end:
http://schema.org/Article";>

  
  
  https://apis.google.com/js/client:platform.js?onload=start"; 
async defer>
  
  
function start() {
  gapi.load('auth2', function() {
auth2 = gapi.auth2.init({
  client_id: 'my clientId',
  // Scopes to request in addition to 'profile' and 'email'
});
  });
}
  


Sign in with Google

  $('#signinButton').click(function() {
auth2.grantOfflineAccess().then(signInCallback);
  });
function signInCallback(authResult) {
  if (authResult['code']) {

$('#signinButton').attr('style', 'display: none');
var googleSignInObject = {
authCode: authResult['code'],
clientId: 'my client id,
clientSecret: 'my client 

How to stop results splitting by Campaign

2018-07-27 Thread Andrew Hughes
I have a request for impression share that I want to return the total 
impression share for the week (as seen on the top row of the normal adwords 
dashboard). I'm only requesting the ImpressionShare metric but it's still 
returning by campaign.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/051924f3-4dce-4af6-bee9-0469767c3a76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


adwords managed from thrid parties software via API

2018-07-27 Thread eliel mizrahi
Hi everyone,

I would like to know, if via API can be integrated several 
adwords sub-accounts in the customers account profile in our site, and 
being them able to manage the amount of money to invest in our site as also 
indexed and promoted in google and the associated networks. 

1 account --> several sub-accounts
Those several sub-accounts linked in the Customers Accounts in our site.  
Customer manage investment from his account in our site.
Get positioned in our site as also in the Google Engine and partners of 
Google.

Wait for your answer,

Best,

Eliel 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/cfe0b635-be8f-441b-9c2a-f706cfd44dc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: USER_PERMISSION_DENIED

2018-07-27 Thread 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Paolo,

The AuthorizationError.USER_PERMISSION_DENIED 

 error 
you encountered means that there is no link between the manager account 
authenticated in the request with the client account specified in the 
headers or your OAuth2 credentials are for a user who does not have access 
to the client customer ID specified or any of its manager accounts. This 
being said, you should make sure that the OAuth2 credentials you are using 
were generated using an email address which has access to the account(s) 
you are making the API requests to. Also, you could use 
ManagedCustomerService 

 to 
determine which client accounts are linked to your manager account. You may 
check this sample code 

 for 
reference.

If the issue persist, could you provide which email address you use to 
generate your OAuth2 credentials? Also, could you provide which 
clientCustomerId you are making API calls when you encountered the error? 
Please reply via *Reply privately to author*.

Thanks and regards,
Luis
AdWords API Team

On Friday, July 27, 2018 at 1:04:59 PM UTC+8, Albert Paolo Rogelio wrote:
>
> Hello. Im new here but i have read other error message and other queries 
> from users here.
>
> My email has the access to 4 manager accounts (including my email it self) 
> in adwords.
> but when authenticating in my application (PHP laravel), i got 
> USER_PERMISSION_DENIED error.
>
> this is my code from getting campaigns:
>
> $ads = new GoogleAds();
>
> $campaignService = $ads->service(CampaignService::class);
> $campaigns = $campaignService->select('campaign_id')->get();
>
> dd($campaigns);
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/f65a59f7-f69e-4e2d-a024-3eaf357a5c3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.