Why GenerateForecastMetrics.php Cannot Find KeywordPlan?

62 views
Skip to first unread message

auctio...@gmail.com

unread,
Sep 10, 2021, 10:49:59 AM9/10/21
to AdWords API and Google Ads API Forum
Hi, 
I am trying get GenerateForecastMetrics.php to work.
Say my customerID = 9999999999

I first run AddKeywordPlan.php and it gives me something like:
customers/9999999999/keywordPlanCampaignKeywords/123456789

Am I right in assuming that '123456789' is saved somewhere?

I then run 
php GenerateForecastMetrics.php --customerId=9999999999 --keywordPlanId=123456789

The following then gets generated:
===============================================================================================
[2021-09-10T10:46:20.555652-04:00] google-ads.WARNING: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v8.services.KeywordPlanService/GenerateForecastMetrics", CustomerId: "No customer ID could be extracted from the request", RequestId: "Rm2N37QUK-TTJicGhNsY_g", IsFault: 1, FaultMessage: "["No plan with planId[123456789] exists"]"
[2021-09-10T10:46:20.560864-04:00] google-ads.NOTICE: Request
-------
Method Name: /google.ads.googleads.v8.services.KeywordPlanService/GenerateForecastMetrics
Headers: {
    "x-goog-api-client": "gl-php\/8.0.10 gapic\/ gax\/1.7.1 grpc\/1.38.0",
    "x-goog-request-params": "keyword_plan=customers\/9999999999\/keywordPlans\/123456789",
    "developer-token": "REDACTED"
}
Request:
{"keywordPlan":"customers/9999999999/keywordPlans/123456789"}

Response
-------
Headers: {
    "request-id": "Rm2N37QUK-TTJicGhNsY_g",
    "date": "Fri, 10 Sep 2021 14:46:20 GMT",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: {"errors":[{"errorCode":{"keywordPlanError":"KEYWORD_PLAN_NOT_FOUND"},"message":"No plan with planId[123456789] exists"}],"requestId":"Rm2N37QUK-TTJicGhNsY_g"}
Request with ID 'Rm2N37QUK-TTJicGhNsY_g' has failed.
Google Ads failure details:
        keyword_plan_error: No plan with planId[123456789] exists
        
        
=============================================================================================        

Why is it not finding this keyword plan?

Thanks,

..Mike

Google Ads API Forum Advisor

unread,
Sep 13, 2021, 11:39:19 PM9/13/21
to auctio...@gmail.com, adwor...@googlegroups.com
Hi Mike,

Thank you for raising your concern.

To investigate, could you provide the actual and complete request and response logs with request ID generated on your end where we can see the error? Also, if the said keyword plan can be seen in the UI, would you be able to provide a sample screenshot of the UI where we can see it?

You can provide the requested details via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NT53e:ref
Reply all
Reply to author
Forward
0 new messages