My Business
1.4K members online now
1.4K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

GMB Insights Issue API

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Good day.

I am using, the API to get the Insights reports. but I am receiving the same empty object. I am using nodejS and this is the  example:

request: 

{ method: 'post',
  json: 
   { locationNames: 
      [ 'accounts/{accounaName}/locations/{locationId}', ],
     drivingDirectionsRequest: { numDays: 'NINETY' } },
  uri: 'https://mybusiness.googleapis.com/v3/accounts/{accounaName}/locations:reportInsights?access_token={token}' }

 and the response:

{ locationDrivingDirectionMetrics: 
   [ { locationName: 'accounts/{accountName}/locations/{locationId}',
       timeZone: 'America/New_York' } ] }

Another example:

{
"locationNames": [
      "accounts/{accountName}/locations/{locationId}",
    ],
    "basicRequest" : {
      "metricRequests": [
        {
          "metric": "QUERIES_DIRECT"
        },  
        {
          "metric": "QUERIES_INDIRECT"
        },  
      ],
      "timeRange": {
        "startTime": "2017-01-01T01:01:23.045123456Z",
        "endTime": "2017-05-11T23:59:59.045123476Z"
      }
    }
}

response:

{}

can you help me, to understand what I'm doing bad?

1 Expert replyverified_user

Re: GMB Insights Issue API

Google Employee
# 2
Google Employee

Hi @Jesse A,

 

We are looking into this and will get back to you soon.

 

Thanks,

The Google My Business API team

GMB Insights Issue API

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi, Shalini, can you tell me, if there is another way to get the information (using the API)?
And how long time you have a response?

Re: GMB Insights Issue API

Google Employee
# 4
Google Employee

Hi @Jesse A,

 

I suggest you follow the Make a simple HTTP request step-by-step guide on the documentation website to use the OAuth 2.0 Playground to experiment with the Google My Business API. This usually helps pinpoint where an application is passing the incorrect info.

 

Thanks,

Shalini, Google My Business API team

GMB Insights Issue API

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Thanks for the recommendation, But I get the same response using OAuth 2.0 Playground:

{}

Re: GMB Insights Issue API

Google Employee
# 6
Google Employee

Hi @Jesse A,

 

Our team is looking into this issue and I’ll let know as soon as I have an update on this.

 

Thanks,

Shalini, Google My Business API team

GMB Insights Issue API

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hi Shalini,

 

is there any update about this issue?

 

Thanks in advance

Re: GMB Insights Issue API

Google Employee
# 8
Google Employee

Hi @Jesse A & @Pablo V,

 

The issue you reported regarding the GMB API report Insight return empty array has been fixed. Please let us know if you find the same issue again.

 

Thanks,

The Google My Business API team

GMB Insights Issue API

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

@Shalini S Not it hasn't. The API still return empty results for every locations.

Re: GMB Insights Issue API

Google Employee
# 10
Google Employee

Hi @Loic L,

 

Please provide us the following information for troubleshooting your issue:  

 

  • Full HTTP request message of the POST request including the URI, and the JSON payloads of request body as well as the response body for triggering this error so that we can help you troubleshoot this issue further.
  • Location IDs
  • If you using Google My Business API client library, please confirm us if you were able to access insights data for your location using the OAuth 2.0 Playground?

 

Thanks,

The Google My Business API Team