Very cool, Paul! Thanks for letting us know!
On Wednesday, November 23, 2011 12:26:50 PM UTC-5, iateadonut wrote:
The following code generates a report for me:
$user = new AdWordsUser();
$user-LogDefaults();
$reportDefinitionId = (float) '131128463';
$result =
Anyone considering using pcntl, should also bear in mind that it's fine for
a small script, but it's easy to end up exhausting resources. It's also
very difficult to debug.
A much more scalable solution to the problem is implementing a Job Queue.
This can allow you to synchronize tasks between
Great, I'm glad it worked for you. I've used pcntl for a few things since.
Be careful installing pcntl on a server you share with others, though. A
runaway fork can easily take down your whole server.
On Monday, June 3, 2013 9:44:19 PM UTC-4, Bill Zhang wrote:
Thank you iateadonut. Your
was using too old of a version of 201109 - updated to the
2012.jan.something release and it works now.
On Feb 9, 10:49 pm, iateadonut orienta@gmail.com wrote:
This no longer works and I'm getting a
QuotaCheckError.INVALID_TOKEN_HEADER error.
I understand this has something to do with the
Hi Alexander,
The library also exposes some ways of manipulating the cache. Take a look
at
http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/src/AdWords/Lib/AdWordsSoapClient.cs#144
to
see how tokens are invalidated and pushed out of the cache. If you need
something more
This no longer works and I'm getting a
QuotaCheckError.INVALID_TOKEN_HEADER error.
I understand this has something to do with the developerToken, but my
auth.ini file looks like this:
email = **@gmail.com
password = **
userAgent = Test App
developerToken = *
So I thought that the developer
Thanks Peter, but I actually already did it this way. I asked
specifically about changing headers *after* creation of the
AdWordsUser. Done your way this will only cause a Captcha exception to
come up.
Alexander
On Jan 23, 10:40 pm, Peter S. peterseew...@gmail.com wrote:
Alexander,
You can
Thanks Anash, especially the step 3 was the missing piece. I even
studied the .NET library source code in depth and saw that object
structure and thought about recompiling with headers exposed in the
AdWordsUser object but it just didn't occur to me that they already
are accessible in this way.
Hi Kevin,
I tried that but where can I just change the clientCustomerId? This
sounds great but the .NET AdwordsUser does require the
clientCustomerId in the headers which seemingly can't be modified
after creation of the AdwordsUser object with New
AdwordsUser(headers). At least I didn't see how
Hi Alexander,
You could do this the following way:
1. Set your MCC email and password in your Web.config.
2. AdWordsUser user = new AdWordsUser(); // this picks up the credentials
from the Web.config.
3. (user.Config as AdWordsAppConfig).ClientCustomerId =
your_client_customerid; // now the
Hi Kevin,
can you please tell me how to do this with the ASP.NET library? I
really looked for AuthToken related methods or attributes but didn't
find anything.
Or another way of doing it (which I might even prefer) - is it
possible to login with the MCC account and download the report once
for
Hi Alexander,
Unfortunately, while the DotNet library does expose the Captcha
challenge, it does not provide any way to solve it and get an AuthToken:
http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/src/Common/Lib/AuthToken.cs#184
Could you please file an issue on the
Hi,
You get Captcha errors because you are not reusing the AuthTokens. The
detailed technical blog is given below for reference, but the summary is
that if you hit the ClientLogin endpoint too frequently, it will challenge
you with a captcha. However, AuthTokens are long-lived, so the parent
I'm misunderstanding:
I do this command only once:
$user = new AdWordsUser();
and then I loop through my customerId's like this:
$user-SetClientId($customerId);
I thought only 'new AdWordsUser()' would generate a new AuthToken?
On Dec 16, 3:11 am, Anash P. Oommen anash.p.oommen
Hi,
In the PHP library, the tokens are generated in a lazy fashion, i.e.
right before they are needed. If you don't cause the AuthToken to get
generated BEFORE the fork, then each forked process will generate its own,
leading to CAPTCHA challenged. You can call GetAuthToken() (
OK,
changed:
$user = new AdWordsUser();
to:
$user = new AdWordsUser();
$user-GetAuthToken();
and i was able to run it three times without a captcha, so that seemed
to do it... not to mention it runs faster now.
thank you all for your help, Kevin, Anash, Eric
on a side
Hi,
I'm not very familiar with PHP, but I believe one suggested approach is
to use pcntl_fork to spawn extra processes and handle multiple concurrent
report downloads that way: http://php.net/manual/en/function.pcntl-fork.php
- Kevin Winter
AdWords API Team
On Wednesday, December 14, 2011
Thanks,
I did it with pcntl_fork. (had a lot of different advice on this -
yours turned out to be the best)
The only problem is that it is consistently triggering Captcha's
(except one doing them one at a time, which takes forever). How do I
deal with these?
Here is the code. I will post
How do you suggest requesting 10 reports at a time (from an array of
300 customerId's) using php? or is this impossible?
On Dec 12, 12:33 pm, Kevin Winter kevin.win...@google.com wrote:
Hi,
Given that AdHoc reports cost 0 units, the cost of requesting the report
to you as a developer is
My client has more than 300 sub-accounts that his company manages.
Sometimes, the sub=account may have no data returned when generating a
report.
I should just fetch each report anyway? 10 at a time and fetch 300
reports?
(Just making sure.) Thanks.
On Dec 1, 2:03 pm, Eric Koleda
Hi,
Given that AdHoc reports cost 0 units, the cost of requesting the report
to you as a developer is the CPU cycles (and IO) required to request it.
The cost to us from a server perspective is a bit more. However, if you
as a developer don't know at report time whether or not there is data
Thanks.
How do I download a report that has information for all my clients
with adHoc reports?
Also, through adHoc reports, selector 'Cost' is a microAmount? How
can I change that back to a dollar amount?
Thank you.
On Nov 30, 6:07 pm, Eric Koleda eric.kol...@google.com wrote:
Hi,
The
Hi,
Cross-client reporting functionality is no longer available in v201109,
although there are ways to achieve the same results using a series of
single-client reports:
http://adwordsapi.blogspot.com/2011/10/downloading-reports-for-lots-of-client.html
The header returnMoneyInMicros header
Hi,
The customer ID shown is the error is a different internal ID, which is why
it doesn't match up. It is however referring to the same account. The
problem here is that the report definition you are referencing was created
on the MCC account, and it's available on the client account you
The following code generates a report for me:
$user = new AdWordsUser();
$user-LogDefaults();
$reportDefinitionId = (float) '131128463';
$result = ReportUtils::RunAsyncReport($reportDefinitionId,
$queryToken, $user, $options);
This is the old CrossClient type of download.
This code,
25 matches
Mail list logo