How can I get the reach for CampaignToForecast ?

69 views
Skip to first unread message

Simone Bonaretti

unread,
Jul 17, 2023, 11:29:37 AM7/17/23
to Google Ads API and AdWords API Forum
Hi,
I've already implemented the CampaignToForecast process but I need also the reach of the words that I'm using for the fortecasts. I've searched on API's documentasion and I found the ReachPlanService,  the problem is when I try to get the plannable location list I get this error :
{ "message": "The caller does not have permission", "code": 7, "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com\/google.ads.googleads.v14.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "authorizationError": "ACTION_NOT_PERMITTED" }, "message": "This request is not authorized to call ReachPlanningService. Developer Token not enabled.", "location": [] } ], "requestId": "Xj-LbXCn4h0nm2qAp7nDSg" } ] }

If i just call the $this->clientAds->getReachPlanServiceClient() no error is raised.
How can i solve this ? Is the right way to obtain the reach of keywords ?

Thanks

Google Ads API Forum Advisor

unread,
Jul 17, 2023, 12:16:37 PM7/17/23
to simonebo...@gmail.com, adwor...@googlegroups.com

Hi Simone, 

Thanks for reaching out to the Google Ads API Team. I hope you are doing well today.

With regard to your concern, it appears that you've encountered the USER_PERMISSION_DENIED error which occurs when the authorized customer does not have access to the operating customer.

This is an authorization error (https://developers.google.com/google-ads/api/docs/best-practices/common-errors#authorizationerror) and its common cause is when authenticating as a user with access to a manager account but not specifying login-customer-id in the request. It also occurs when the OAuth2 credentials (https://developers.google.com/google-ads/api/docs/oauth/cloud-project) you are using were generated by a user / email address that does not have access (https://support.google.com/google-ads/answer/9978556?visit_id=638028230738600037-122357065&rd=1) to the account (customer_id) specified in your request. You can manage user access by referring to this article (https://support.google.com/google-ads/answer/6372672).

If the issue persists even after doing the above details, for our team to further compare, investigate, and validate why you are encountering issues, can you provide more information?
 

  • Provide the complete (request and response with request-id) logs with request ID generated as shown in the respective links.
  • Email address of the authenticating user


If you haven't enabled logging yet, using REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.

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

Reference links:


Have a great day.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2n8Wp2:ref"

Thanks,

 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages