Google DNS API & Gcloud Console Error - windows

I'm using gcloud console for windows and have enabled the Google DNS API in the developer console. I have authenticated from the gcloud console, but when I try to do anything with the DNS api, I get the following error message:
{
"error": {
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your pro ject.",
"reason": "accessNotConfigured"
}
],
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
} } ERROR: (gcloud.dns.managed-zone.list) ResponseError: status=403, code=Forbidden, reason(s)=accessNotConfigured
message=Access Not Configured. Please use Google Developers Console to
activate the API for your project.
Has anyone else had this problem?

There are a number of things to look at including if you have enabled billing for your project. Follow the link for more information https://cloud.google.com/dns/getting-started

Related

Youtube API 3, fetch feed stopped working

I am using the https://www.googleapis.com/auth/youtube.readonly endpoint.
I can successfully Oauth my application, but when I use my keys I get:
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. YouTube Data API has not been used in project 45754353xxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=45754353xxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=45754353xxxx"
}
],
"code": 403
This was working until a few days ago. The link provided above (without the xxxx) fails to load in the google cloud console.
Any ideas?
Thanks.
create a new project, add the api you need to it and add a key for the new project.
i had the same error 403 but now it works fine. hope this help for you

Google G Suite Business Reports API configuration

I'm trying to configure Google Service Account (in developers console) to use it in my application to get Reports API.
I'm getting error - "Access denied. You are not authorized to read activity records". It seems some issue with configuration.
I created new Project and Service Account in Google Developers Console. Added Client ID in Admin Console Settings Manage API client access menu.
Maybe I missed something?
Please, help.
Server response is:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Access denied. You are not authorized to read activity records.",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Access denied. You are not authorized to read activity records."
}
}
You can try to call the .setServiceAccountUser("admins email address") as per described in this SO post if you haven't done yet.

projects.getiampolicy (cloudresource manager api)

Utilizing the cloud resource api, specifically projects.getIamPolicy Running this for projects I own returns the following:
"error": { "code": 403, "message": "The caller does not have
permission", "status": "PERMISSION_DENIED
I have enabled the Cloud Resource Manager API with no success. I can successfully run the gcloud sdk command "projects get-iam-policy projectID" however the API errors out in the API Explorer as well as via Python.
Any help?

APIs Explorer ipRefererBlocked

How to use Google API Explorer?
https://developers.google.com/apis-explorer/#p/plusDomains/v1/plusDomains.people.get
I would like test Google+ Domains API and even via API Explorer I receive 403 error:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "ipRefererBlocked",
"message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
}
}
This is an app settings issue in the Google Developers Console. On the credentials screen it lists the IPs that are allowed to use the API Key. It's a security precaution to help protect the key if it leaks.
As the picture
You need to edit allowed IPs to either be empty (less secure) or update it to include the actual IP of your server.
As the picture

pageSpeedOnline.pagespeedapi().runpagespeed(..) function fails with error 403

I have tried to analyze url page using pageSpeedOnline.pagespeedapi().runpagespeed(..) api but fails with 403 "Forbidden". The api is enabled in the console and the billing is also enabled but I am blocked further since it always fails with 403. The billing was just enabled since a week back.
Below is the response of the curl request,
curl "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=http://code.google.com/speed/page-speed/&key=API_KEY"
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
Please help.
I got it resolved, by creating "Key for browser apps (with referers)" and used that API key in the project.

Resources