Google My Business API fails - google-my-business-api

Getting a strange error message and there is literally nothing on it anywhere I look. Granted access to Google My Business API, followed directions here;
https://developers.google.com/my-business/content/get-started
All went well, but the expected 200 response was actually the below;
{
"error": {
"status": "PERMISSION_DENIED",
"message": "The request was blocked. Quota configuration not found for the requesting project.",
"code": 403,
"details": [
{
"violations": [
{
"description": "The request was blocked. Quota configuration not found for the requesting project.",
"subject": "project:XXXXXXXXXX"
}
],
"#type": "type.googleapis.com/google.rpc.QuotaFailure"
}
]
}
}
Anyone have any idea how to add quotas in Google Developer console, or, alternately, if this message is a result of expired permissions perhaps? (Granted access in Feb, did not use until now?)

This is what you get when the project in question does not have Google My Business API access, as granted through their official process etc. When I used the correct project I got a 200 and all is well.
So sayeth the GMB folks themselves, who answered my email same day!

Related

Google My Business API - How to extract logo and cover with new API version

I have to retrieve the logo and cover from the Google My Business Locations and I would like to understand which kind of API I should call.
To get the locations list I've called the accounts.locations.list and the REST services give me back the correct results with a lot of data.
But these results do not contain the media logo and cover, and reading the documentation I've seen this page accounts.locations.media.list but it refers to the old API with a hostname "mybusiness.googleapis.com" while the other is "mybusinessbusinessinformation.googleapis.com", and calling it with the OAuth 2.0 Playground the service returns this error:
{
"error": {
"status": "PERMISSION_DENIED",
"message": "Google My Business API has not been used in project 711831863231 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=711831863231 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"code": 403,
"details": [
{
"#type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"url": "https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=711831863231",
"description": "Google developers console API activation"
}
]
},
{
"reason": "SERVICE_DISABLED",
"#type": "type.googleapis.com/google.rpc.ErrorInfo",
"domain": "googleapis.com",
"metadata": {
"consumer": "projects/711831863231",
"service": "mybusiness.googleapis.com"
}
}
]
}
}
so I thought that I needed to add the API on the Google Console page but all the My Business API are enabled and I don't see a generic My Business or a specific Media API to add.
I think this API might be disable as showed on the response with the label "SERVICE_DISABLED" but I can't understand which API I have to call to extract this information (logo and cover, but also the other media linked with the location).

Comments: update gives 403 forbidden insufficient permissions

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/

Create Team, 400 Bad Request, Required functionality is not supported

I'm trying to create a Microsoft Teams team in Migration mode via the Graph API. However I get a 400 response that I can't figure out. The query is shared in the link below.
Shared Query
For those that don't want to view it that way, here is my request:
POST https://graph.microsoft.com/beta/teams
Authorization: Bearer ...
Content-Type: application/json
{
"#microsoft.graph.teamCreationMode": "migration",
"template#odata.bind": "https://graph.microsoft.com/beta/teamsTemplates(\u0027standard\u0027)",
"displayName": "SlackMigrationTest",
"description": "testing slack migrations",
"createdDateTime": "2021-01-14T00:00:00.000Z"
}
I created this based on the microsoft doc here.
The reponse I get is:
The remote server returned an error: (400) Bad Request.
{
"error": {
"code": "BadRequest",
"message": "Required functionality is not supported.",
"innerError": {
"date": "2021-01-20T15:51:21",
"request-id": "dc4189cf-db4a-4a60-a271-f63b5d759a05",
"client-request-id": "dc4189cf-db4a-4a60-a271-f63b5d759a05"
}
}
}
I'm sure its something obvious that I'm missing but any help would be greatly appreciated.
Here you are using the User Context token and trying to make the call. This API call only works in Application context as shown in the below screenshot.
So use Client Credential flow and set Application permissions and then make a call.
As you can see below, it worked for me with App token.
You cannot test it in graph explorer because the Graph Explorer gets user token.

microsoft-graph api users endpoint with filter provides NextLink Token Expired

Removing my code as part of the equation, I was able to reproduce this through the Microsoft Graph API Explorer.
First, I Do a GET https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses%2fany(d%3ad%2fskuid+eq+ --actualySKUIDHere--)
I get results back like
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#users",
"#odata.nextLink": "https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses%2fany(d%3ad%2fskuid+eq+
--actualSKUIDHere-- )&$skiptoken=X%27 --actualtokenhere-- %27",
"value": [
{
I copy paste the nextLink into the API Explorer
ie.
https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses%2fany(d%3ad%2fskuid+eq+ --actualSKUIDHere-- )&$skiptoken=X%27 --actualtokenhere-- %27
and it works with good results like above, but the next skipToken is shorter and copy & pasting it will result in the following
{
"error": {
"code": "Directory_ExpiredPageToken",
"message": "The specified page token value has expired and can no longer be included in your request.",
"innerError": {
"request-id": "4cce84ea-83c5-403a-98d2-5ad5c948fcdc",
"date": "2020-02-03T21:04:43"
}
} }
I'm assuming this is a bug but wanted to post to see if anyone else has experienced this and has a resolution
This was a temporary service issue which has been fixed since. You should not try to parse/modify the next link in your application, simply use it as provided by the service.

Google+ Domains API Not Configured

When I try to post an activity to Google+ I get the error:
{
"error": {
"code": 403,
"message": "Access Not Configured. The API (Google+ Domains API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. The API (Google+ Domains API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"reason": "accessNotConfigured",
"extendedHelp": "https://console.developers.google.com"
}
]
}
}
I know this question has been asked before here, but I have a different message in my error. I've also enabled Google Domains API in the console. I'm using a Gmail account and I also receive circles and contacts information with the following scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.google.com/m8/feeds https://www.googleapis.com/auth/plus.login
https://www.googleapis.com/auth/plus.stream.write
https://www.googleapis.com/auth/plus.me
My Post body is:
{
"object": {
"originalContent": "Happy Monday! #caseofthemondays"
},
"access": {
"items": [
{
"type": "domain"
}
],
"domainRestricted": true
}
}
Found out this feature is only available for Google Apps customers not anyone else.
Reference
Have you created (or using) the API_KEYs in your Google project?
If not, go to Google developer console and select the credentials section under APIs & Auth and create the API key relevant for your application.
If you already have a key, try regenerating a new one

Resources