I, too, am experiencing this issue. How long does it take before a 
page_token expires?

I can paginate through hundreds of times but after a few hours, I get that 
error response. I've tried querying with a page size of 1,000-10,000 and it 
doesn't matter. Eventually the next_page_token expires. Does the expiration 
date begin at the beginning of the query or each time the page_token is 
created? As I said before, it takes HOURS to pull in the data.

I've also tried "search_stream" but I eventually get a timeout error that 
way too.

Here is the log of the request and response:


























*Method: /google.ads.googleads.v8.services.GoogleAdsService/SearchHost: 
googleads.googleapis.comHeaders: { "developer-token": "REDACTED", 
"login-customer-id": "9439287549", "x-goog-api-client": "gl-python/3.6.9 
grpc/1.41.0 gax/1.31.1", "x-goog-request-params": 
"customer_id=4562346636"}Request: customer_id: "4562346636"query: "SELECT 
segments.date,customer.currency_code,customer.id,campaign.name,campaign.id,ad_group.name,ad_group.id,search_term_view.search_term,segments.search_term_match_type,segments.device,segments.ad_network_type,metrics.clicks,metrics.cost_micros,metrics.impressions,metrics.conversions,metrics.conversions_value,metrics.all_conversions,metrics.all_conversions_value\nFROM
 
search_term_view\nWHERE segments.date BETWEEN \'2021-08-01\' AND 
\'2021-08-01\'"page_token: 
"CMDG8c2b0LrdfBCwlb4DGKaK3M7KLyIWQXNXZjBsazBpTUt6QW5CMWkwVHNEZyoCVjgwADim4OytC0D___________8B"Response-------Headers:
 
{ "google.ads.googleads.v8.errors.googleadsfailure-bin": 
"\n\u001d\n\u0002\b\b\u0012\u0017Page token has 
expired.\u0012\u0016kjbtXoxu5148I1uQim0FrQ", "grpc-status-details-bin": 
"\b\u0003\u0012%Request contains an invalid 
argument.\u001a~\nCtype.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure\u00127\n\u001d\n\u0002\b\b\u0012\u0017Page
 
token has expired.\u0012\u0016kjbtXoxu5148I1uQim0FrQ", "request-id": 
"kjbtXoxu5148I1uQim0FrQ"}Fault: errors { error_code { request_error: 
EXPIRED_PAGE_TOKEN } message: "Page token has expired."}request_id: 
"kjbtXoxu5148I1uQim0FrQ"*

-Joey
On Monday, May 17, 2021 at 7:49:04 AM UTC-6 Google Ads API Forum Advisor 
Prod wrote:

> Hi Lukas,
>
> Glad to hear you found a workaround. Please let us know if any related 
> issues arise. 
>
>
> Regards,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2HAFqj:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/145d55f7-9613-47f9-9f04-6e8ef902f1b4n%40googlegroups.com.
  • Re... Joey Sumi
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Joey Sumi
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
          • ... Joey Sumi
            • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to