projects.getiampolicy (cloudresource manager api) - google-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?

Related

How to configure authentication from Azure data factory to Google Sheets

I am trying to fetch data from Google Sheets via the Azure Data Factory. I have a data flow configured, and a Google Sheets Linked Service configured as well. The Google Sheets Linked Service is using an API key that has no Application Restrictions, and for API restrictions, it is restricted to Google Sheets. When I test the connection, it is successful. However, when I try to fetch a spreadsheet using the data flow in debug mode, I get the error:
at Source 'GoogleSheetsOutput': Failure to read most recent page request: DF-REST_001 - Error response from server: Some({
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}), Status code: 403. Please check your request url and body. (url:https://sheets.googleapis.com/v4/spreadsheets/<my_spreadsheet_id>/values/Sheet1!A2:B3,request body: None, request method: GET)
I made a service account, and shared the google sheet with the service account e-mail, and I also shared it with the admin on the account, which is where the API Key was made.
Any ideas what I need to do here? I would also prefer to use oauth / service account instead if possible, so I am happy to go down that route if there is some documentation I can follow.
"error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED" }
I tried to repro this and got the same error.
To solve this, I changed access of my google sheets from restricted to Anyone with the link
It worked and data is previewed without error.

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 API - Google Play Services - Error 500 Message:Null

Request URL:
https://content.googleapis.com/games/v1/players/[CORRECT_PLAYER_ID]?access_token=[CORRECT_APPLICATION_ACCESS_TOKEN]
The application is Server and set up like here:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount
The only response is:
{
"error": {
"code": 500,
"message": null
}
}
In API Explorer I have:
...
"code": 401,
"message": "User has not completed registration."
...
What is wrong with my use case? How I can workaround Verification of Google Play Services User ID?
A 500 response is a server-side error, which sounds more like a bug than a question. It looks like they have a place to report bugs here.
I think this might not execute through the APIs Explorer this way because you haven't registered your project with the credentials being used; it doesn't currently have a way to use your own credentials instead.

Google DNS API & Gcloud Console Error

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

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