Re: API support for AdWords "Labels" feature?

2014-07-04 Thread David Midgley
Hi Eli

As requested, here you go! You still need to create an endpoint that will 
take the posted label mappings.

I've had this in production for a few days and it works well. We are only 
looking for certain labels so there is code to choose the labels you care 
about, but that can be easily removed - I've indicated in the comments 
where this is.

It does one post per account. If you have a lot of labels you could move 
the position of the posting code to inside the label loop to reduce the 
size, but increase the frequency of your posts to one per label per account.

I hope it helps!

Cheers

David

Use at your own risk, don't blame me if it breaks everything, etc:

//Populate myLabels with all the labels you are interested in
var myLabels = [];
myLabels.push('Brand');
myLabels.push('Product');
myLabels.push('Generic');

//Set "apiUrlAndKey" to url of API enpoint that accepts post of json data 
with mappings
var apiUrlAndKey = '__API_URL__';

function main() {
  //Select all active accounts
  var accountIterator = MccApp.accounts()
.withCondition('Clicks > 0')
.forDateRange('LAST_MONTH')
.orderBy('Name')
.get();

  while (accountIterator.hasNext()) {
var account = accountIterator.next();
var customerId = account.getCustomerId();
Logger.log(customerId + ': ' + account.getName());

MccApp.select(account);

var labelUpdates = [];
//Push all my label names to array
var labelNames = getAllMyLabels();

labelNames.forEach(function (labelName) {
var campaignIterator = AdWordsApp.campaigns()
  .withCondition('LabelNames CONTAINS_ANY ["' + labelName + '"]')
  .get();
  while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
//Push update to object array
labelUpdates.push({customerId: customerId, label: labelName, 
campaignId: campaign.getId()});
  }
});

//If there are label updates - post data
if (labelUpdates.length > 0) {
  var req = JSON.stringify(labelUpdates);
  
  //Call api with mappings
  //You can add authorization header to authenticate or send internal 
api key in query string
  var options = {
method: 'POST',
payload: req,
contentType: 'application/json'
  };
  
  Logger.log('Sending request to API: ' + req);
  var resp = UrlFetchApp.fetch(apiUrlAndKey, options).getContentText();
  Logger.log('Response from API: ' + resp);
}
  }
}

function getAllMyLabels() {
  var labelNames = [];
  var labelIterator = AdWordsApp.labels().get();  
  while (labelIterator.hasNext()) {
var labelName = labelIterator.next().getName();
//Check if label name is in the list you are interested in
//You can remove this if statement if you want all labels
if (myLabels.indexOf(labelName) !== -1) {
  labelNames.push(labelName);
}
  }
  return labelNames;
}


On Friday, 4 July 2014 01:10:14 UTC+1, Eli Fatsi wrote:
>
> David Midgley I would be very interested in seeing what you've put 
> together!
>
> -Eli
>
> On Tuesday, July 1, 2014 12:05:52 PM UTC-4, David Midgley wrote:
>>
>> I've just written an mcc adwords script that iterates though all the 
>> accounts in an mcc and posts customerids and campaign labels to an API. I 
>> can post the code if anyone's interested...
>>
>> On Friday, 13 June 2014 10:26:36 UTC+1, Ben Marengo wrote:
>>>
>>> great, thanks. i'll give it a whirl!
>>>
>>> On Friday, 13 June 2014 11:22:12 UTC+2, DavM wrote:

 Here you go! You still need to create an endpoint that will take the 
 posted label mappings, I hope it helps!

 Use at your own risk, don't blame me if it breaks everything, etc:

 //Set "apiUrlAndKey" to url of API enpoint that accepts post of json 
 data with mappings
 var apiUrlAndKey = '__API_URL__';

 function main() {
   var labelUpdates = [];
   //Push all label names to array
   var labelNames = getAllLabels();
   
   //Iterate through all labels
   labelNames.forEach(function (labelName) {
 //Iterate through all campaigns with that label
 var campaignIterator = AdWordsApp.campaigns()
 .withCondition('LabelNames CONTAINS_ANY ["' + labelName + '"]')
 .get();
 while (campaignIterator.hasNext()) {
   var campaign = campaignIterator.next();
   //Push update to object array
   labelUpdates.push({label: labelName, campaignId: 
 campaign.getId()});
 }
   });

   var req = JSON.stringify(labelUpdates);
   
   //Call api with mappings
   //You can add authorization header to authenticate or send internal 
 api key in query string
   var options = {
 method: 'POST',
 payload: req,
 contentType: 'application/json'
   };
   
   Logger.log('Sending request to API: ' + req);
   var resp = UrlFetchApp.fetch(apiUrlAndKey, options).getContentText();
>>>

Re: purchase order id

2014-07-04 Thread Danial Klimkin
Hello Dzu,


If you already have any existing orders, you can inspect one of them:

  
https://developers.google.com/adwords/api/docs/reference/v201402/BudgetOrderService.BudgetOrder

In other cases, it can only be found in the UI.


-Danial, AdWords API Team.

On Friday, July 4, 2014 10:14:05 AM UTC+4, Dzu wrote:
>
> which parameter should be used of  BudgetOrderService 
> 
> ?
>
>
>
>
> 2014 m. liepa 3 d., ketvirtadienis 15:23:17 UTC+3, Danial Klimkin rašė:
>>
>> Hello,
>>
>>
>> You can obtain it via the user interface or the BudgetOrderService 
>> 
>>  
>> of the API. Please note, this service is whitelist-only and typically 
>> available to official resellers only.
>>
>>
>> -Danial, AdWords API Team.
>>
>>
>> On Thursday, July 3, 2014 9:34:33 AM UTC+4, Dzu wrote:
>>>
>>> Hello,
>>>
>>> how can i get "purchase order" number from bill with google api then i 
>>> have company id?
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Update ad fields

2014-07-04 Thread adwords
Hi, 

i want to update headline, description 1, description 2, url etc... of an 
AD... 

I have to delete / pause then create a new one ? or can i update directly 
an ad  ? 

I don't find any code.

thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Null Pointer Exception when downloading adhoc report

2014-07-04 Thread Jyothi Vejju
Hey Danial,

Yes, none of the parameters is null. I am printing those values to check 
the same. 
I am not reading it from ads.properties file, and getting the parameters 
from database.

When I read parameters from ads.properties file, it works. But getting them 
from database does n't work.


On Thursday, July 3, 2014 2:04:06 PM UTC, Danial Klimkin wrote:
>
> Hello Jyothi,
>
>
> Please make sure all the parameters you are passing are not null. Also, 
> did you set up the ads.properties file?
>
>
> -Danial, AdWords API Team.
>
>
> On Thursday, July 3, 2014 4:07:51 PM UTC+4, Jyothi Vejju wrote:
>>
>>
>> Hi,
>>
>> I am trying to get account level stats using adhoc reports.
>> But when I run my program, I get this error :
>>
>> Caused by: java.lang.NullPointerException
>> at 
>> com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
>> at 
>> com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
>> at 
>> com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:96)
>> at 
>> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
>> at 
>> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
>> at 
>> com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
>> at 
>> com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
>> at 
>> com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
>> at 
>> com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
>> at 
>> com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:247)
>> at 
>> com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
>> at 
>> com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
>> at 
>> com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)
>> ...
>>
>> The code is :
>> Credential oAuth2Credential = 
>> new OfflineCredentials.Builder().forApi(Api.ADWORDS)
>> .withClientSecrets(clientId, 
>> clientSecret)
>> 
>> .withRefreshToken(refreshToken)
>> .build().generateCredential();
>> 
>> AdWordsSession session = new 
>> AdWordsSession.Builder().withDeveloperToken(developerToken)
>>   
>>.withOAuth2Credential(oAuth2Credential)
>>   
>>.build();
>>
>> Can someone help me with the possible causes?
>>
>> Thanks,
>> Jyothi
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


API v UI data discrepancy

2014-07-04 Thread Brad Powers
Hello,

I am using the AdWords API to pull data into a BI tool and have noticed 
that my cost data is not reconciling to the data in the UI and the 
discrepancy grows each week.  It looks like the discrepancy is primarily 
attributed to Display campaigns.

Is there any particular reason the data pulled through the API is 
consistently off from the data displayed in the UI and is there any way to 
fix this?

Thanks,
Brad

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


INCOMPLETE_SIGNUP

2014-07-04 Thread Anton Chepa


Hi,


I have a test account.
I have a production account with Pending Approval DEVELOPER_TOKEN.

When I try to run one of the adwords api lib examples I get the error.

Uncaught SoapFault exception: [soap:Server] 
[QuotaCheckError.INCOMPLETE_SIGNUP @ ; trigger:'']

https://developers.google.com/adwords/api/docs/common-errors#QuotaCheckError

"
1. You did not enter billing information for the developer token's MCC.
2. You did not agree to the terms and conditions on the developer token's 
MCC.
...
"

When I try to enter billing information for the  production MCC (id 
647-740-0614) and next agree to the terms and conditions...


(russian) - "specify the source of payment". But there is nothing to choose 
or enter.(?)



Honestly I don't quite understand what account you need to fill in the 
billing information. In a test account no item in the settings for billing 
information.
I would be grateful for your help.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Null Pointer Exception when downloading adhoc report

2014-07-04 Thread Danial Klimkin
Hello Jyothi,


Please log this as an issue on the library bug tracker:

  https://github.com/googleads/googleads-java-lib/issues

The library should report a better error on what's missing.


-Danial, AdWords API Team.


On Friday, July 4, 2014 8:30:01 AM UTC+4, Jyothi Vejju wrote:
>
> Hey Danial,
>
> Yes, none of the parameters is null. I am printing those values to check 
> the same. 
> I am not reading it from ads.properties file, and getting the parameters 
> from database.
>
> When I read parameters from ads.properties file, it works. But getting 
> them from database does n't work.
>
>
> On Thursday, July 3, 2014 2:04:06 PM UTC, Danial Klimkin wrote:
>>
>> Hello Jyothi,
>>
>>
>> Please make sure all the parameters you are passing are not null. Also, 
>> did you set up the ads.properties file?
>>
>>
>> -Danial, AdWords API Team.
>>
>>
>> On Thursday, July 3, 2014 4:07:51 PM UTC+4, Jyothi Vejju wrote:
>>>
>>>
>>> Hi,
>>>
>>> I am trying to get account level stats using adhoc reports.
>>> But when I run my program, I get this error :
>>>
>>> Caused by: java.lang.NullPointerException
>>> at 
>>> com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
>>> at 
>>> com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
>>> at 
>>> com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:96)
>>> at 
>>> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
>>> at 
>>> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
>>> at 
>>> com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
>>> at 
>>> com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
>>> at 
>>> com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
>>> at 
>>> com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
>>> at 
>>> com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:247)
>>> at 
>>> com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
>>> at 
>>> com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
>>> at 
>>> com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)
>>> ...
>>>
>>> The code is :
>>> Credential oAuth2Credential = 
>>> new OfflineCredentials.Builder().forApi(Api.ADWORDS)
>>> .withClientSecrets(clientId, 
>>> clientSecret)
>>> 
>>> .withRefreshToken(refreshToken)
>>> 
>>> .build().generateCredential();
>>> 
>>> AdWordsSession session = new 
>>> AdWordsSession.Builder().withDeveloperToken(developerToken)
>>> 
>>>  .withOAuth2Credential(oAuth2Credential)
>>> 
>>>  .build();
>>>
>>> Can someone help me with the possible causes?
>>>
>>> Thanks,
>>> Jyothi
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: Missing Impression Data for PLA Campaigns May 6-20, 2014

2014-07-04 Thread Danial Klimkin
Hello Charlie,


What is the target account CID you are running this report against?


-Danial, AdWords API Team.


On Friday, June 27, 2014 10:59:22 PM UTC+4, Charlie Saunders wrote:
>
> Hello all,
>
> I'm having an issue where my API downloads contain no impression data for 
> Product Listing Ads campaigns for May 6 through May 20, 2014.  I see 
> impressions in the web interface for these campaigns and I have data for 
> other metrics (e.g. clicks, cost) during that period.
>
> Any ideas for a solution?
>
> Here is the beautified SOAP:
>
>> 
>> https://adwords.google.com/api/adwords/cm/v201402";>
>> 
>> Query
>> Date
>> CampaignName
>> AdGroupName
>> KeywordTextMatchingQuery
>> AveragePosition
>> Clicks
>> Impressions
>> Cost
>> Conversions
>> TotalConvValue
>> 
>> CampaignName
>> IN
>> (ROI) Product Listing Ads
>> (ROI) Product Listing Ads - ID
>> (ROI) Product Listing Ads Shopping
>> 
>> 
>> 20140501
>> 20140626
>> 
>> 
>> SEARCH_QUERY_PERFORMANCE_REPORT 
>> #1403893553529
>> SEARCH_QUERY_PERFORMANCE_REPORT
>> CUSTOM_DATE
>> TSV
>> 
>> 2014-06-27 14:26:07,177 INFO c.g.a.a.a.l.u.report_download [main] 
>> Response received with status code 200 and message: OK
>
>
> Thank you! 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: INCOMPLETE_SIGNUP

2014-07-04 Thread Danial Klimkin
Hello Anton,


For Russian accounts, T&C needs to be accepted in written and invoicing 
billing needs to be set up. Please check with the reviews team as described 
here:

  https://groups.google.com/forum/#!topic/adwords-api/rp0HFwu-E0M


-Danial, AdWords API Team.


On Thursday, July 3, 2014 5:52:39 PM UTC+4, Anton Chepa wrote:
>
> Hi,
>
>
> I have a test account.
> I have a production account with Pending Approval DEVELOPER_TOKEN.
>
> When I try to run one of the adwords api lib examples I get the error.
>
> Uncaught SoapFault exception: [soap:Server] 
> [QuotaCheckError.INCOMPLETE_SIGNUP @ ; trigger:'']
>
>
> https://developers.google.com/adwords/api/docs/common-errors#QuotaCheckError
>
> "
> 1. You did not enter billing information for the developer token's MCC.
> 2. You did not agree to the terms and conditions on the developer token's 
> MCC.
> ...
> "
>
> When I try to enter billing information for the  production MCC (id 
> 647-740-0614) and next agree to the terms and conditions...
>
>
> 
> (russian) - "specify the source of payment". But there is nothing to 
> choose or enter.(?)
>
>
>
> Honestly I don't quite understand what account you need to fill in the 
> billing information. In a test account no item in the settings for 
> billing information.
> I would be grateful for your help.
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: API v UI data discrepancy

2014-07-04 Thread Danial Klimkin
Hello Brad,


When you pull API reports, what time span do you request? Cost data can be 
adjusted for 72 hours after the fact, so try re-loading the same data after 
this period for adjusted values.


-Danial, AdWords API Team.


On Thursday, July 3, 2014 9:01:48 PM UTC+4, Brad Powers wrote:
>
> Hello,
>
> I am using the AdWords API to pull data into a BI tool and have noticed 
> that my cost data is not reconciling to the data in the UI and the 
> discrepancy grows each week.  It looks like the discrepancy is primarily 
> attributed to Display campaigns.
>
> Is there any particular reason the data pulled through the API is 
> consistently off from the data displayed in the UI and is there any way to 
> fix this?
>
> Thanks,
> Brad
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: Update ad fields

2014-07-04 Thread Danial Klimkin
Hello,


Ads in AdWords are immutable. To update an Ad you need to create a new one 
and delete the old one. The same happens if you update an Ad via the User 
Interface.


-Danial, AdWords API Team.


On Thursday, July 3, 2014 11:44:57 PM UTC+4, adw...@web2roi.com wrote:
>
> Hi, 
>
> i want to update headline, description 1, description 2, url etc... of an 
> AD... 
>
> I have to delete / pause then create a new one ? or can i update directly 
> an ad  ? 
>
> I don't find any code.
>
> thanks
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Null Pointer Exception when downloading adhoc report

2014-07-04 Thread Jyothi Vejju
Hi Danial,

I have logged this issue on the library bug tracker.
https://github.com/googleads/googleads-java-lib/issues/19

Thanks,
Jyothi

On Friday, July 4, 2014 9:07:43 AM UTC, Danial Klimkin wrote:
>
> Hello Jyothi,
>
>
> Please log this as an issue on the library bug tracker:
>
>   https://github.com/googleads/googleads-java-lib/issues
>
> The library should report a better error on what's missing.
>
>
> -Danial, AdWords API Team.
>
>
> On Friday, July 4, 2014 8:30:01 AM UTC+4, Jyothi Vejju wrote:
>>
>> Hey Danial,
>>
>> Yes, none of the parameters is null. I am printing those values to check 
>> the same. 
>> I am not reading it from ads.properties file, and getting the parameters 
>> from database.
>>
>> When I read parameters from ads.properties file, it works. But getting 
>> them from database does n't work.
>>
>>
>> On Thursday, July 3, 2014 2:04:06 PM UTC, Danial Klimkin wrote:
>>>
>>> Hello Jyothi,
>>>
>>>
>>> Please make sure all the parameters you are passing are not null. Also, 
>>> did you set up the ads.properties file?
>>>
>>>
>>> -Danial, AdWords API Team.
>>>
>>>
>>> On Thursday, July 3, 2014 4:07:51 PM UTC+4, Jyothi Vejju wrote:


 Hi,

 I am trying to get account level stats using adhoc reports.
 But when I run my program, I get this error :

 Caused by: java.lang.NullPointerException
 at 
 com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
 at 
 com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
 at 
 com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:96)
 at 
 com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
 at 
 com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
 at 
 com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
 at 
 com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
 at 
 com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
 at 
 com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
 at 
 com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:247)
 at 
 com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
 at 
 com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
 at 
 com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)
 ...

 The code is :
 Credential oAuth2Credential = 
 new OfflineCredentials.Builder().forApi(Api.ADWORDS)
 
 .withClientSecrets(clientId, clientSecret)
 
 .withRefreshToken(refreshToken)
 
 .build().generateCredential();
 
 AdWordsSession session = new 
 AdWordsSession.Builder().withDeveloperToken(developerToken)
 
  .withOAuth2Credential(oAuth2Credential)
 
  .build();

 Can someone help me with the possible causes?

 Thanks,
 Jyothi

>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Null Pointer Exception when downloading adhoc report

2014-07-04 Thread Danial Klimkin
Hello Jyothi,


Thank you. The library maintainer will investigate this and follow up 
within the bug.


-Danial, AdWords API Team.


On Friday, July 4, 2014 1:39:07 PM UTC+4, Jyothi Vejju wrote:
>
> Hi Danial,
>
> I have logged this issue on the library bug tracker.
> https://github.com/googleads/googleads-java-lib/issues/19
>
> Thanks,
> Jyothi
>
> On Friday, July 4, 2014 9:07:43 AM UTC, Danial Klimkin wrote:
>>
>> Hello Jyothi,
>>
>>
>> Please log this as an issue on the library bug tracker:
>>
>>   https://github.com/googleads/googleads-java-lib/issues
>>
>> The library should report a better error on what's missing.
>>
>>
>> -Danial, AdWords API Team.
>>
>>
>> On Friday, July 4, 2014 8:30:01 AM UTC+4, Jyothi Vejju wrote:
>>>
>>> Hey Danial,
>>>
>>> Yes, none of the parameters is null. I am printing those values to check 
>>> the same. 
>>> I am not reading it from ads.properties file, and getting the parameters 
>>> from database.
>>>
>>> When I read parameters from ads.properties file, it works. But getting 
>>> them from database does n't work.
>>>
>>>
>>> On Thursday, July 3, 2014 2:04:06 PM UTC, Danial Klimkin wrote:

 Hello Jyothi,


 Please make sure all the parameters you are passing are not null. Also, 
 did you set up the ads.properties file?


 -Danial, AdWords API Team.


 On Thursday, July 3, 2014 4:07:51 PM UTC+4, Jyothi Vejju wrote:
>
>
> Hi,
>
> I am trying to get account level stats using adhoc reports.
> But when I run my program, I get this error :
>
> Caused by: java.lang.NullPointerException
> at 
> com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
> at 
> com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
> at 
> com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:96)
> at 
> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
> at 
> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
> at 
> com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
> at 
> com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
> at 
> com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
> at 
> com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
> at 
> com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:247)
> at 
> com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
> at 
> com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
> at 
> com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)
> ...
>
> The code is :
> Credential oAuth2Credential = 
> new OfflineCredentials.Builder().forApi(Api.ADWORDS)
> 
> .withClientSecrets(clientId, clientSecret)
> 
> .withRefreshToken(refreshToken)
> 
> .build().generateCredential();
> 
> AdWordsSession session = new 
> AdWordsSession.Builder().withDeveloperToken(developerToken)
>   
>.withOAuth2Credential(oAuth2Credential)
>   
>.build();
>
> Can someone help me with the possible causes?
>
> Thanks,
> Jyothi
>


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.


Re: [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro] this morning

2014-07-04 Thread SL
It is happening less often.
Unfortinally I don't have logs from the last time. I will  next time though.

Thanks,
Sam

On Tuesday, July 1, 2014 3:11:30 PM UTC-4, Ray Tsang (AdWords API Team) 
wrote:
>
> I'm looking into the issue.
>
> Has this been consistent?
>
> Thanks,
>
> Ray
>
> On Monday, June 30, 2014 8:23:20 PM UTC-4, FreeKill wrote:
>>
>> I'm having the exact same problem, and just in the last day or so...
>>
>> On Friday, June 27, 2014 11:25:40 AM UTC-4, SL wrote:
>>>
>>> This morning a proses which was working fine started to error on it's 
>>> second call (I am iterating through a csv file) with 
>>> [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
>>> com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro]
>>>  
>>>
>>> it is happening by the get command "page = 
>>> adGroupService.get(selector);".
>>>
>>> ...
>>> // Create the selector.
>>> Selector selector = new Selector();
>>> selector.fields = new string[] { "Id", "Name", "Status" };
>>>
>>> // Create the filters.
>>> selector.predicates = new Predicate[3];
>>> selector.predicates[0] = new Predicate();
>>> selector.predicates[0].field = "Name";
>>> selector.predicates[0].@operator = PredicateOperator.EQUALS;
>>> selector.predicates[0].values = new String[] { adGroupName };
>>>
>>> // Set the selector paging.
>>> selector.paging = new Paging();
>>>
>>> int offset = 0;
>>> int pageSize = 500;
>>> //selector.paging.startIndex = 0;
>>> //selector.paging.numberResults = 1;
>>>
>>> AdGroupPage page = new AdGroupPage();
>>>
>>> try
>>> {
>>> selector.paging.startIndex = offset;
>>> selector.paging.numberResults = pageSize;
>>> // Get the ad groups.
>>> page = adGroupService.get(selector);
>>>
>>> // Display the results.
>>> if (page != null && page.entries != null)
>>> {
>>> foreach (AdGroup adGroup in page.entries)
>>> {
>>> this.notify_UI(string.Format("Ad group Name: 
>>> '{0}', ID: {1}, Status: {2}.\n", adGroup.name, adGroup.id, adGroup.status));
>>> adGroupIdList.Add(adGroup.id);
>>> }
>>> }
>>> else
>>> return null;
>>> }
>>> catch (Exception ex)
>>> {
>>> this.notify_UI(ex.ToString() + "\n", true);
>>> return null;
>>> }
>>> ...
>>>
>>> I put in a sleep command for 10 seconds after which the error can on 
>>> approximately the 14 time.
>>>
>>> Thanks,
>>> Sam
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
For more options, visit https://groups.google.com/d/optout.