Google My Business Error - When Returning Reviews List From Location

44 views
Skip to first unread message

Luke Wigley

unread,
Aug 4, 2020, 5:46:50 AM8/4/20
to AdWords API and Google Ads API Forum
Hi,

I can return the account information with no problems at all but whenever I try to retrieve the information for locations or reviews for a location. I get the error at the bottom of the page. 

Is this structure:

"accounts/117775730258471875388/locations/7279417290310182213"

For the parent name correct? 


All code shown below. Code is blue and error is red.

            string MybusinessServiceScope = "https://www.googleapis.com/auth/business.manage";
            string serviceAccountEmail = "[Removed for Security Reasons]";

            string filePath = WebsiteConfiguration.AppDataFilePath + "key.p12";
            var certificate = new X509Certificate2(filePath, "notasecret", X509KeyStorageFlags.Exportable);

            ServiceAccountCredential credential = new ServiceAccountCredential(
              new ServiceAccountCredential.Initializer(serviceAccountEmail)
              {
                  Scopes = new[] { MybusinessServiceScope }
              }.FromCertificate(certificate));


            string error = "";
            // Creates the service.
            MyBusinessService service = new MyBusinessService(new BaseClientService.Initializer()
            {
                HttpClientInitializer = credential,
                ApplicationName = "Client for mybusinessapi"
            });

            try
            {
                var accountsListRequest = service.Accounts.Locations.Reviews.List("accounts/117775730258471875388/locations/7279417290310182213");
                ListReviewsResponse accountsResult = accountsListRequest.Execute();
            }
            catch(Exception ex)
            {
                error = ex.Message + ex.InnerException;
            }


Google.Apis.Requests.RequestError
Requested entity was not found. [404]
Errors [
Message[Requested entity was not found.] Location[ - ] Reason[notFound] Domain[global]
]



Google Ads API Forum Advisor Prod

unread,
Aug 4, 2020, 2:44:17 PM8/4/20
to adwor...@googlegroups.com
Hello,

Thank you for reaching out. It looks like you are using the Google My Business API. Since this forum is mainly for Google Ads API/AdWords API technical issues, I suggest reaching out to the My Business Community here. You can also contact their support team here.

Regards,
Danica, Google Ads API Team

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