I'm currently working on migrating from the Google My business V4.9 to the Business Profile Performance API .
For number of credentials the changes are working as expected but for others, there is a problem with making the request as I'm getting this error.
GET https://businessprofileperformance.googleapis.com/v1/locations/****:getDailyMetricsTimeSeries?dailyMetric=CALL_CLICKS&dailyRange.endDate.day=8&dailyRange.endDate.month=1&dailyRange.endDate.year=2023&dailyRange.startDate.day=31&dailyRange.startDate.month=12&dailyRange.startDate.year=2022
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "The caller does not have permission",
"reason" : "forbidden"
} ],
"message" : "The caller does not have permission",
"status" : "PERMISSION_DENIED"
}
Worth to mention that for the same credentials and scope everything is working with the older endpoints.
I'm currently using https://www.googleapis.com/auth/plus.business.manage, can this be the problem as it has been deprecated(But you can still use it) and now there is https://www.googleapis.com/auth/business.manage instead?
UPDATE
It seems that before it simply returned an empty list of reports for this location, and now it's throwing an exception.
Related
I am getting an error when trying to connect my DV360 account to Datorama Stream. I know for sure my credentials arent the problem because I am granted acces when using Google Analytics or Adwords with the same account but specifically with DV360 I get this:
Provider's Internal Error
403 Forbidden GET https://displayvideo.googleapis.com/v1/advertisers?pageSize=100&partnerId=4611731
{ "code" : 403, "errors" :
[ { "domain" : "global",
"message" : "No permission for attempted operation on PARTNER with ID \"4611731\".",
"reason" : "forbidden" } ],
"message" : "No permission for attempted operation on PARTNER with ID \"4611731\".", "status" : "PERMISSION_DENIED" }
Does anyone know what the problem might be? would it be something on the web app side?
Cheers,
In my java spring boot application, I am using google spreadsheet API's but sometimes (very rarely) I got the below exception from batchUpdate API.
Below is the code :-
BatchUpdateSpreadsheetRequest requestBody = new BatchUpdateSpreadsheetRequest();
requestBody.setRequests(requests);
Sheets sheetService = googleConfigConstant.getSheetService();
Sheets.Spreadsheets.BatchUpdate reques =
sheetService.spreadsheets().batchUpdate(spreadsheetId, requestBody);
Exception what I am getting :-
com.google.api.client.googleapis.json.GoogleJsonResponseException: 409
Conflict
POST https://sheets.googleapis.com/v4/spreadsheets/dummy-spreadsheet-id:batchUpdate?
quotaUser=testuser
{
"code" : 409,
"errors" : [ {
"domain" : "global",
"message" : "The operation was aborted.",
"reason" : "aborted"
} ],
"message" : "The operation was aborted.",
"status" : "ABORTED"
}
After searching a lot I am not able to find the root cause, any help would be appreciated.
I tried this API here and in my code and got this error everywhere. However, other methods, such as commentThreads.insert() or comments.delete(), work fine, so I don't think this issue is scopes or OAuth 2.0 authorization related.
Here is the response I get:
{
"error": {
"code": 403,
"message": "The comment could not be updated due to insufficient permissions. The request might not be properly authorized.",
"errors": [
{
"message": "The comment could not be updated due to insufficient permissions. The request might not be properly authorized.",
"domain": "youtube.comment",
"reason": "forbidden",
"location": "body",
"locationType": "other"
}
]
}
}
UPD:
Apparently, you can only update the comment under your own video. But you can delete your comment from any video. I don’t know why they did it that way and didn't even write about it in the docs. I also wrote to them on https://issuetracker.google.com/
When calling the YouTube API, we've started getting error responses with the following message:
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Project 418176253215 has been scheduled for deletion and cannot be used for API calls. Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project.",
"reason" : "accessNotConfigured",
"extendedHelp" : "https://console.developers.google.com/iam-admin/projects?pendingDeletion=true"
} ],
"message" : "Project 418176253215 has been scheduled for deletion and cannot be used for API calls. Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project."
}
However, I cannot use the link provided because I can't find what account was used to create the key for the API (I've inherited the code).
Is there a way to discover what account aligns with a YouTube API key?
There is no documentation in Youtube API which states how to do this because if you own the API key, logging in the Google Dev Console under the given project name should easily display all the API keys being used.
I'm using the google safebrowsing api for getting fullhashes for the prefixes of hashes of url present in threat lists. When i'm using 5 threads to do the job, the job completes but the latency is high, so i tried increasing the threads to 7 and more but i'm getting the following error on doing that:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 504 Gateway Time-out
{
"code" : 504,
"errors" : [ {
"domain" : "global",
"message" : "Deadline expired before operation could complete.",
"reason" : "backendError"
} ],
"message" : "Deadline expired before operation could complete.",
"status" : "DEADLINE_EXCEEDED"
}
But, I'm sure that my daily quota has not exceeded.
By looking at the console, i can see that the number of requests per second is not more than the default quota (3000 req/100sec).
What other reason can be there for the above error ?