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]*
*]*



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/5c5a4132-5e16-468c-9638-95bdfeb62c6eo%40googlegroups.com.
  • Google My Business ... 'Luke Wigley' via AdWords API and Google Ads API Forum

Reply via email to