How do I get the data from my Google fusiontable via a browser get-request? - google-api

I don't know what else I could do to get the data via a browser get-request from my google fusiontable.
The fusiontable is public and downloadable and the Google Fusion Tables App is authorized.
When I call this:
https://www.googleapis.com/fusiontables/v1/query?sql=SELECT * FROM
MY_FUSIONTABLE_ID&key=MY_KEY
I get this response:
{
"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."
}
}
Why does this happen?
I created a Project in the Google Developer Console and created a Server Key and a Browser Key each - they are both not working. Which one do I have to use?
I already acticated all! Apis for my project, since I thougth, I didn't activate the right one. Still not working.
When I read "usageLimits" I thought, maybe my table has too many rows. But neither LIMIT 10 in the Query works nor delete all rows but 3 in the fusiontable.
Any ideas, why it still says "accessNotConfigured"?
Is there a way to connect my fusiontable to my project in the developer console?
Thanks for every hint!
Greetings,
Jan

This message is only related to the project, not to the particular table(I'm able to request your table with my key).
As the message says, the Fusion Tables API -service is not activated for this project.
So check(again):
If the used key is the key generated for this project(you may have multiple projects)
If the Fusion Tables API -service is activated for this particular project

Related

Error Migrating Google Workspace to O365 - Calendar API Errors

I'm trying to build out a migration from Google Workspace into MS365. I've tried each of MS's recommended methods; Automatic, Manual, and PowerShell. For each one, I get the same error message
post-migration
uri=https://www.googleapis.com/calendar/v3/users/me/calendarList?maxResults=250 response={ "error": { "code": 403, "message": "Google Calendar API has not been used in project 206754733531 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531 then retry.
If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"errors": [ { "message": "Google Calendar API has not been used in project 206754733531 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "domain": "usageLimits", "reason": "accessNotConfigured", "extendedHelp": "https://console.developers.google.com" } ], "status": "PERMISSION_DENIED", "details": [ { "#type": "type.googleapis.com/google.rpc.Help", "links": [ { "description": "Google developers console API activation", "url": "https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531" } ] }, { "#type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "SERVICE_DISABLED", "domain": "googleapis.com", "metadata": { "consumer": "projects/206754733531", "service": "calendar-json.googleapis.com" } } ] } } . --> The remote server returned an error: (403) Forbidden.
When I follow the link
https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531**
I see the following screen
Relating to the PERMISSION_DENIED portion of the error, I have ensured that the ServiceAccount associated with the project has been added to the project and has the requisite permissions based on MS's documentation.
I really don't know what I'm doing incorrectly or where I'm going wrong. I'm incredibly new to all things programming and development so I apologize if this isn't nearly enough detail. I'm happy to provide more context/info as needed.
Google Calendar API has not been used in project 206754733531 before or it is disabled
Means that the Google calendar api has not been enabled in your app or its disabled.
Here are a few things to check in order of likelihood of causing your issue.
I would double check that you are in fact checking the correct project on google developer console for the service account credentials you are using. You may have downloaded a file for a different project and are checking the wrong one.
After that i would check the quota allotment you have for the google calendar api. Click the manage button in that link. If your quota is 0 then google has disabled your access for some reason. If they have check your email they should have told you why it was disabled.
SERVICE_DISABLED
If you have created the service account on google developer console logged in as a standard gmail user its not going to work. Service accounts only work with google calendar api with google workspace.
PERMISSION_DENIED
Make sure that you are creating this service account on the domain that you intended to access. Google calendar only works with service accounts from google workspace domain accounts with domain wide delegation setup. Great guide in setting up delegation Perform Google Workspace Domain-Wide Delegation of Authority just change the scopes to the google calendar scope you are using.

Google Calendar API request is denied for scope https://www.googleapis.com/auth/calendar.app.created

My app needs to create a Google Calendar and manage events in it for users. Google API Console allows to create a consent form for this scope:
https://www.googleapis.com/auth/calendar.app.created
It is supposed to allow creation of secondary calendars and events in those calendars. Description reads:
Make secondary Google calendars, and see, create, change, and delete
events on them
However, after a user gives permission through the consent form etc, I am getting PERMISSION_DENIED when I try to create a calendar (I am using the REST api https://www.googleapis.com/calendar/v3/calendars)
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"errors": [
{
"message": "Insufficient Permission",
"domain": "global",
"reason": "insufficientPermissions"
}
],
"status": "PERMISSION_DENIED"
}
}
My code and the rest of the plumbing (authorization code, access token etc) works because if I use this scope:
https://www.googleapis.com/auth/calendar
I am able to create the calendar.
So, anybody knows if https://www.googleapis.com/auth/calendar.app.created is deprecated or something? It is not listed in the V3 calendar documentation but I was hopping that it continue to work. I hate to ask the user for full permission to all calendars since I only want to create and access a secondary calendar and that scope supposed to do exactly what I need.
Thoughts?
As you can see under OAuth 2.0 Scopes for Google APIs, https://www.googleapis.com/auth/calendar.app.created is not a valid scope for Calendar API v3.
The documentation for Calendars:insert states that the only valid scope for creating a new calendar is https://www.googleapis.com/auth/calendar
You notice yourself that if you try to create a calendar with https://www.googleapis.com/auth/calendar.app.created - be it on OAuth2 playground or elsewhere - the request fails with a 403 error
CONCLUSION
Unfortunately https://www.googleapis.com/auth/calendar.app.created is not a valid scope, the acceptance of this scope on OAuth2 playground is a bug.
https://www.googleapis.com/auth/calendar.app.created might not seem as valid scope - but works for me.
Successfully could create new calendar with that scope, then manage events within it, and calendar itself appears on list of calendars in calendar.google.com
Can't really help much without knowing exactly the flow you have on creating and executing requests to google. Also keep in mind it worked for me with server side app. Using latest library provided by google for PHP.

YouTube Data API returns "Access Not Configured" error, although it is enabled

My internally used web solution to retrieve YouTube video statistics that is based on this example (https://developers.google.com/youtube/v3/quickstart/js) now fails to work. Not sure when exactly it happened, but it used to work couple of months ago.
I now tried to run unedited example code (apart from adjusting the CLIENT_ID, of course), and I am getting exactly the same error:
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. YouTube Data API has not been used in project 123 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=123 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=123" } ], "code": 403, "message": "Access Not Configured. YouTube Data API has not been used in project 123 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=123 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
When I check the YouTube API in developer console, it shows enabled status, and the Credentials compatible with this API include the ID used to authenticate the client. I can see the statistics for credential use increment when I retry the API call attempts, and the metrics reflect the number of requests and also show that the error rate is 100%. But there is no extra info on those failed attempts in the console to help on debugging the problem.
I have deleted and recreated API key and OAuth key, but that did not change anything.
Had there been any extra info on those errors on the developer console side, for example client quote exceeded, I could see how to fix this. Now I am completely stuck.
Create a new project
Weirdly, creating a new project just gets the API to work properly!
The error message is unfortunately a red herring: your project's access to YouTube Data API Services is automatically disabled after a 90 day inactivity period.
You should have received a notice via email regarding this action, which also contains the steps that need to be taken to regain access: please fill out and submit the exceptions form.
Try to start a new Project with new oAuthCliedID & oAuthClientSecret
What seems to have done it for me after a lot of fiddling was to:
Go to the OAuth consent screen of the project.
Enter an Application name.
Press Save.
Lo and behold, after 5 minutes it started working.

Luis: Access denied due to invalid subscription key

I am facing following issue when i try to update application on Luis using following request:
https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/app-id-here
header:
Ocp-Apim-Subscription-Key:paid-subscription key
body:
{
"name": "Name of luis app",
"description": "string"
}
I am getting following error:
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
I am using paid subscription from Azure portal with westus region. Still facing this issue.
However, This key works when I try to get top scoring intent using following request:
https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/luis-app-id?subscription-key=subscription-key-azure&timezoneOffset=-360&q=hi
This is really weird as sunscription key works for GET request but not for PUT or POST request.
Any suggestions?
PS: I am using paid subscription key.
The (subscription) keys created with a Cognitive Service LUIS resource in Azure Portal, even when added to with Assign resource in luis.ai, can only be used for runtime queries on a defined app.
The authoring endpoints on LUIS Programmatic APIs v2.0 - to create and manage apps and their elements - can only be used with the Authoring Key available in the luis.ai portal.
More information can be found in Authoring and query prediction endpoint keys in LUIS
It looks like you have two issues you are working thru here.
First, the API you are trying to post to should read "https://[location].api.cognitive.microsoft.com/luis/api/v2.0/apps/{appId}/publish". From the looks of it, you are missing the 'publish' at the end of your API call.
Second, the paid subscription key needs to be added to your LUIS app. Can you confirm it has been added? If not, follow these steps to do so:
Click Manage => Keys and Endpoints.
Next, click 'Assign resource'.
A window will pop up allowing you to select the tenant, subscription, and the key to use.
Click OK.
Click 'Publish' to make the newly generated endpoint accessible.
Make sure you add subscription primary key value in my request and also make sure you have associated your API with the product which you used the Primary key

Google Translate API always returning 'Daily Limit Exceeded'

I'm trying to get the google translate API up and running. On the getting started guide, it gives the following example: https://www.googleapis.com/language/translate/v2/detect?key={MyAppId}&q=google+translate+is+fast
I just want to get this working for now, so I'm just trying to get it working view via a browser post, so I created a testing web application (screenshot):
and grabbed the API key, replaced the sample URL's key with my API key. I get the following response:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceeded",
"message": "Daily Limit Exceeded"
}
],
"code": 403,
"message": "Daily Limit Exceeded"
}
}
I should also note, that I have signed my account up with the billing option (I plan on using the service quite a bit), so I should have no issues at the moment.
I'm obviously doing something wrong, but I don't know what. Any suggestions?
For getting data translated you have to enable billing and have to register your credit/debit card.After you register your card 1$ will be deducted and then you will be able to use your URL
I did it recently and it worked fine.
I am also working on translating project nowadays.
Let me know if you need any kind of help on this topic
Ishan
I would first confirm that the Translate API is enabled under the "APIs" link in the Cloud Console - if it is not enabled, that effectively sets the quota to zero and may produce a similar message.
If the API is enabled, then the following link describes how to check the usage limits for your project:
https://developers.google.com/translate/v2/pricing
You can change the quotas manually:
to complement #Ishan Arora, after you add the credit card info, go to the console, enter into the project, a message will popup asking to setup the billing account for your project, if you want to get ride of the error, just select "set project into the billing account" drop down list.
On my case, the same problem was caused by credit card expiration

Resources