Wednesday, July 11, 2012

Digest for adsense-api@googlegroups.com - 14 Messages in 3 Topics

Group: http://groups.google.com/group/adsense-api/topics

    "Sérgio Gomes" <sergiomdgomes@gmail.com> Jul 10 04:06AM -0700  

    Hi there,
     
    I'll reply privately to you with a workaround. If anyone else needs to get
    around the 50.000 rows limit, please feel free to contact me.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Tuesday, July 10, 2012 11:59:37 AM UTC+1, Dinero spt wrote:

     

    Johnny Hom <Johnny.Hom@demandmedia.com> Jul 10 09:04AM -0700  

    Hi Sérgio
    We are having the same limitation issues in getting reporting data for domain names.
    A work around would be much appreciated.
     
    Johnny Hom
    BI Apps Engineer
     
    From: adsense-api@googlegroups.com [mailto:adsense-api@googlegroups.com] On Behalf Of Sérgio Gomes
    Sent: Tuesday, July 10, 2012 4:07 AM
    To: adsense-api@googlegroups.com
    Subject: Re: Reports limits
     
    Hi there,
     
    I'll reply privately to you with a workaround. If anyone else needs to get around the 50.000 rows limit, please feel free to contact me.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Tuesday, July 10, 2012 11:59:37 AM UTC+1, Dinero spt wrote:
    Hi Sérgio,
     
    Now I am using alt=csv in my generate request , but still i am not able to fetch more then 50,000 records.
     
    My request header is showing me this data --
     
    apiHttpRequest Object ( [url:protected] => https://www.googleapis.com/adsense/v1.1/reports?startDate=2012-07-06&endDate=2012-07-09&metric=PAGE_VIEWS&metric=CLICKS&metric=EARNINGS&metric=COST_PER_CLICK&dimension=DATE&dimension=DOMAIN_NAME&sort=-EARNINGS&alt=csv [requestMethod:protected] => GET [requestHeaders:protected] => Array ( ) [postBody:protected] => [userAgent:protected] => google-api-php-client/0.5.0 [responseHttpCode:protected] => [responseHeaders:protected] => [responseBody:protected] => [accessKey] => )
     
    Can you please help me.
     
    Thanks in advance,
     
    On Monday, July 2, 2012 12:35:49 PM UTC+5:30, Dinero spt wrote:
     
    Hi Sérgio,
     
    I am using google client library for PHP, and fetching the adsense reports and downloading them into CSV files.
    There is not any paging i have applied till now. I am displaying records on browser also and provoded the link to download the records in CSV file , but report stops at 50000 records.
     
    Thanks,
    Dinero SPT
     
    On Friday, June 29, 2012 8:42:03 PM UTC+5:30, Sérgio Gomes wrote:
    Hi there,
     
    Yes, but you'll need to retrieve your reports in CSV format by setting the "alt" parameter in your generate request to the value "csv". If you give me some details on what programming language you're using (and whether or not you're using a client library) I may be able to give you some further help.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Friday, June 29, 2012 8:14:29 AM UTC+1, Dinero spt wrote:
     
    HI ,
     
    I want to fetch all the records using the adsense api but it stops at 50000 records.
    Is it possible i can remove this limit and display all the records?
     
    Thanks
     
     
    On Friday, March 30, 2012 7:42:23 PM UTC+5:30, Sérgio Gomes wrote:
    Hi Andrei,
     
    Sorry, I should have been clearer on the limits page. The limits only apply to inline JSON responses; if you use gzipped CSV, then it's not a problem.
     
    They also have not changed; these are the same limits that have been in place since the beginning; we were just trying to provide some more clarity. Which I suppose may have not worked so well :)
     
    We'll be working on some content showing how to use gzipped CSV downloading, and will be updating our other documentation accordingly. In the meantime if you or anyone else has any questions on how to use this feature, let us know here, and we'll be happy to help you figure out how to do that your specific programming environment!
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Friday, 30 March 2012 11:05:09 UTC+1, Andrei wrote:
    Hi,
    We're using the AdHoc reporting feature of the API to retrieve KEYWORD_PERFORMANCE_REPORTS on CUSTOM_DATE in GZIPPED_CSV format. If I'm reading this blog post (http://feedproxy.google.com/~r/GoogleAdsDeveloperBlog/~3/_zFRiK8mQ44/adsense-management-api-working-with.html<http://feedproxy.google.com/%7Er/GoogleAdsDeveloperBlog/%7E3/_zFRiK8mQ44/adsense-management-api-working-with.html>) correctly, the maximum number of rows per report delivered as of March 29th should be no higher than 50,000. However, the reports our application has downloaded on March 30th at 8:10 AM UTC have the correct number of rows in them, which is much higher than 50,000.
     
    I'm not sure how to interpret this: am I required to change our reports downloading process to only request batches of 5,000 rows by paging them using startIndex and numberResults, or the above blog post does not apply to this kind of reporting?
     
    Thank you
    --
    You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/NeHizh_ue80J.
    To post to this group, send email to adsense-api@googlegroups.com<mailto:adsense-api@googlegroups.com>.
    To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com<mailto:adsense-api+unsubscribe@googlegroups.com>.
    For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.
     
    ________________________________
    Please NOTE: This electronic message, including any attachments, may include privileged, confidential and/or inside information owned by Demand Media, Inc. Any distribution or use of this communication by anyone other than the intended recipient(s) is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by replying to this message and then delete it from your system. Thank you.

     

    Michael Ormonde <michael.ormonde2@gmail.com> Jul 10 03:02AM -0700  

    It's for a crontab process (so manual setup of account(s) as above and then
    allowing it to automatically run on a basic box) if that makes sense.
    Process just uses the access/refresh tokens to maintain access over
    numerous runs
     
    Michael
     
    On Monday, 9 July 2012 14:50:12 UTC+1, Sérgio Gomes wrote:

     

    "Sérgio Gomes" <sergiomdgomes@gmail.com> Jul 10 04:01AM -0700  

    Hi Michael,
     
    In that case, you should be using OAuth 2.0 for installed applications<https://developers.google.com/accounts/docs/OAuth2InstalledApp>instead, and storing the refresh token between uses (so that you only have
    to grant permissions once). I'm not entirely sure whether switching to this
    will fix your problem, but it's worth a shot!
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Monday, July 9, 2012 2:50:12 PM UTC+1, Sérgio Gomes wrote:

     

    Michael Ormonde <michael.ormonde2@gmail.com> Jul 10 07:57AM -0700  

    I had been storing the refresh token to do future requests (I've had this
    working on several accounts for a couple of months), the problem was the
    device authorisation didn't seem to be working whereas it had before.
    However, I tried the different flow you suggested above for installed
    applications, and the auth flow on that page worked for me :) I was able to
    authorise the new account, and once I completed the response handling, I
    got back the same access/refresh tokens I'd gotten for my other accounts
    using the device method
     
    Thanks so much for your help with this, I'd wouldn't have thought to try a
    different auth process without your suggestion
     
    All the best,
    Michael
     
    On Tuesday, 10 July 2012 12:01:55 UTC+1, Sérgio Gomes wrote:

     

    "Sérgio Gomes" <sergiomdgomes@gmail.com> Jul 10 03:52AM -0700  

    Hi Dor,
     
    I assume this is a web application you're building? The redirect or
    callback URL is used so that your application can get the auth data (it's
    part of the OAuth 2.0 protocol).
     
    If you're building a desktop application instead, then you should set up an
    "installed application" client ID in your project instead.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    ----
    On Tuesday, July 10, 2012 9:23:30 AM UTC+1, Dor Ben Dov wrote:

     

    Dor Ben Dov <doribd@gmail.com> Jul 10 05:13AM -0700  

    Sergio,
    Can i write a sample code, run it once, get the token, use it to get the
    authentication key.
    Save this token and authentication key.
    Use them to access adsense reporting api (my account) .
    Can also say that the authentication key or the token are permanent and
    won't be changed ?
     
     
    Regards,
    Dor
     
    On Tuesday, July 10, 2012 1:52:48 PM UTC+3, Sérgio Gomes wrote:

     

    "Sérgio Gomes" <sergiomdgomes@gmail.com> Jul 10 05:20AM -0700  

    Hi Dor,
     
    You can indeed. When you run the OAuth 2.0 flow with offline access
    enabled, you'll get back two tokens: an access token and a refresh token.
    The former is short-lived and used to make requests, whereas the latter can
    be used to request new access tokens.
     
    You can save your refresh token to disk and use that to generate a new
    access token whenever you need to make requests. The refresh token won't
    stop working unless the user revokes access to your application.
     
    Hope this helps!
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Tuesday, July 10, 2012 1:13:35 PM UTC+1, Dor Ben Dov wrote:

     

    Dor Ben Dov <doribd@gmail.com> Jul 10 06:00AM -0700  

    Hi,
     
    Is there any simple way to create the access token ?
    Let's say i have the access token and the user (which is me) won't revoke
    the application.
    Can i use this access token with the adsense reporting api to retrieve my
    application data ? forever till it will be revoked ?
     
    Regards,
    Dor
     
    On Tuesday, July 10, 2012 3:20:22 PM UTC+3, Sérgio Gomes wrote:

     

    "Sérgio Gomes" <sergiomdgomes@gmail.com> Jul 10 06:12AM -0700  

    Hi Dor,
     
    Only the refresh token is long-lived. The access token expires after a
    short amount of time. You should save your refresh token (which will not
    expire) and generate new access tokens when you need
    them: https://developers.google.com/accounts/docs/OAuth2InstalledApp#refresh
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Tuesday, July 10, 2012 2:00:22 PM UTC+1, Dor Ben Dov wrote:

     

    Dor Ben Dov <doribd@gmail.com> Jul 10 06:48AM -0700  

    Hi Sergio,
    Can i use the refresh token for all the ad sense reporting api access ? or
    do i need to do that with the access token.
    Each request should have a different token or can i use the same access
    token for all my request (which means that using the refresh token that
    saved i will get the access token for the specific session and use it for
    all the requests).
     
    Regards,
    Dor
     
    On Tuesday, July 10, 2012 4:12:57 PM UTC+3, Sérgio Gomes wrote:

     

    "Sérgio Gomes" <sergiomdgomes@gmail.com> Jul 10 06:54AM -0700  

    Hi Dor,
     
    You need to use access tokens in your requests. You can generate them from
    your saved refresh token.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    ---
    On Tuesday, July 10, 2012 2:48:57 PM UTC+1, Dor Ben Dov wrote:

     

    Dor Ben Dov <doribd@gmail.com> Jul 10 06:59AM -0700  

    Ok thanks great.
     
    Now for the first question again, where can i find a simple java code
    example on how to generate the refresh token.
     
    Then i will need to make another http call to get the access key right ?
    and then with it to make another http call to the ad sense reporting api
    right ?
     
     
    Thanks in advanced,
    Dor
     
    On Tuesday, July 10, 2012 4:54:44 PM UTC+3, Sérgio Gomes wrote:

     

You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To post to this group, send email to adsense-api@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.

No comments:

Post a Comment