KeywordPlanIdeaService.GenerateKeywordIdeas

26 views
Skip to first unread message

yakuo

unread,
Sep 2, 2025, 6:46:20 AM (7 days ago)  Sep 2
to Google Ads API and AdWords API Forum

Hi Google Ads API Team,

We’re seeing intermittent authentication failures when calling  KeywordPlanIdeaService.GenerateKeywordIdeas. The issue affects  some Google Ads accounts but not others using the same app credentials.

Endpoint

Request body

{ "keywordAndUrlSeed" : { "keywords" : [ "" ] , "url" : "" } , "pageSize" : 100 }

Observed error (from our logs)

statusCode: 503 message: "Google Ads Error: 2 UNKNOWN: Getting metadata from plugin failed with error: invalid_grant" error: "ServiceUnavailableException"


Symptoms

  • Only some customer accounts fail; others succeed with the same setup.

  • Always using the same  developer token and  login-customer-id (MCC level).

  • Endpoint and request payload are identical across working/failing cases.

  • Rotating to a newly re-consented refresh token sometimes resolves the issue for a given account.

Google Ads API Forum Advisor

unread,
Sep 2, 2025, 9:33:14 AM (7 days ago)  Sep 2
to yakupt...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

Based on the provided information, I understand that you are encountering an invalid_grant error, The invalid_grant error usually indicates an issue with the refresh token. That said, you’ll need to regenerate credentials and refresh tokens. You may refer here to this guide for the steps on how you can regenerate credentials and refresh tokens. You may also check this sample code for generating user credentials.

Additionally, I could see that you are using a V19 version. I would suggest you  upgrade to the latest version , ’ v21 ’, as soon as possible to benefit from new features. You may refer to this documentation on  deprecation and sunset for more information regarding the specific deprecation and sunset dates for each available version.

If the issue persists, please provide the complete API logs ( request and response with request-id and request header ) generated at your end when calling the API so that we can check from our end and assist you further.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java , .Net , PHP , Python , Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private replyto this email.


Thanks,
Google Logo
Google Ads API Team

Feedback
How was our support today?

rating1 rating2 rating3 rating4 rating5
[2025-09-02 13:32:08Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u5axd:ref" (ADR-00331587)



Reply all
Reply to author
Forward
0 new messages