Hello everyone,
I'm running into a 404 error when attempting to use the Google Business Profile Performance API through the "Make an API call" module in callin.io. My other Google My Business modules are functioning correctly, which suggests my connection and authentication are properly configured.
I've confirmed that the location ID is accurate and that I have the necessary access via my connected account.
- Body:
{
"dailyMetrics": ["ALL_DIRECTIONS", "CALL_CLICKS", "WEBSITE_CLICKS"],
"dailyRange": {
"startDate": {
"year": 2023,
"month": 1,
"day": 1
},
"endDate": {
"year": 2023,
"month": 1,
"day": 31
}
}
}
- Headers:
Key: Content-Type, Value: application/json
Could there be something I'm overlooking, or another reason for this 404 error?
Thanks in advance for any assistance!
Can anyone assist me?
I suspect the issue lies with either the BODY or the URL.
I've modified the body dates, but it's still not functioning.
Hi there! I noticed you're using a POST request instead of a GET request.
Hope that helps!
Hello, do you have the CURL for the API call?
Hi,
I believe this is the correct one:
Here is a link to the documentation: Method: locations.fetchMultiDailyMetricsTimeSeries | Google Business Profile APIs | Google for Developers
Okay great, just paste the CURL command into callin.io. The AI will set up the HTTP module correctly for you, and you can make the necessary adjustments there.
Okay, thanks, but is there a way to utilize the Google My Business API module? I'd prefer not to authorize the OAuth2 Client through the HTTP module.
Could you please provide guidance on how to achieve this?
Could it be because there are only 30 days in November?
Edit: Also, looking at the official API documentation, ‘ALL_DIRECTIONS’ is not a valid enum value in the list of permitted dailyMetrics.
Thanks, you are correct about the dates.
I've updated the BODY to:
{
"dailyMetrics": ["WEBSITE_CLICKS", "CALL_CLICKS"],
"dailyRange": {
"startDate": {
"year": 2024,
"month": 11,
"day": 1
},
"endDate": {
"year": 2024,
"month": 11,
"day": 30
}
}
}
However, I'm still encountering an error 400.
Could you please assist with this?
As it’s a GET request, you need to enter the query parameters either in the URL itself, or as key/value pairs under Query String. I’d give it a go in the URL first to be sure it’s working.
Could you provide an example of query parameters within a URL? I'm not quite sure what you're referring to.
Certainly. Using the example you previously provided from the documentation, the URL would look like this:
v1/locations/12345:fetchMultiDailyMetricsTimeSeries?dailyMetrics=WEBSITECLICKS&dailyMetrics=CALLCLICKS&dailyRange.startdate.year=2022&dailyRange.startdate.month=1&dailyRange.startdate.day=1&dailyRange.enddate.year=2022&dailyRange.enddate.month=3&dailyRange.enddate.day=31
It's functioning now! Thank you very much
And what is the alternative method? Could you provide an example using key/value pairs within the Query String?