I have an django application which gets the google drive token from front-end to be able to download the file from google drive. Then stores the token in the database.
I used the 100 char field for storing the token, but starting from database I get error, that token has bigger length.
So how can I know what is the max length of the took google API will return?
I saw the answer for question Can access token be longer than 255 characters? which says I shouldn't use the limit.
But how I can make sure I know when google changes something in their API?
So how can I know what is the max length of the took google API will return?
Google hasn't documented it and this linked answer refers to the OAuth 2 spec A.12 being specified as minimum 1 character and unbounded.
But how I can make sure I know when google changes something in their API?
If Google changes something that was previously documented, there's likely to be a new version or a deprecation note and a blog post or release note. If (like in this case) they changed something that wasn't documented then you'll find out about it from your own or others' experience (here and other community forums are good places).
The suggestion here is not to put a limit on the length in choosing the datatype you used in your database.
Related
For a given Google API, is there any way to dynamically check usage against any of the current limits for that API?
For example, this page https://developers.google.com/classroom/limits?hl=en shows that I can query the Classrooms API 4,000,000 times per client per day. At midday, without going to the API Console, how could I know that I've already hit 3 million queries?
I'm hoping that there's a billing or usage API that covers this, but can't see it.
Note: I'm not having any issue right now with a specific call, just anticipating that my usage will scale up significantly in the next few months, so am looking for a solution for monitoring rather than advice on not hitting the limits at all. My specific use-case is for Google Classrooms, but reading wider around this I can't see a general solution either.
Answer:
No, dynamically you can't retrieve this information.
Feature Request:
You can however let Google know that this is a feature that is important for the Google Workspace APIs to have, and that you would like to request they implement it.
The page to file a Feature Request for the Google Classroom API is here, as there is no specific component for Google Workspace APIs in general I would suggest filing it here instead.
You can use Google's Cloud Monitoring API to achieve this. This is the documentation page for APIs-
https://cloud.google.com/monitoring/api/v3
This is the documentation page for concerned metrics-
https://cloud.google.com/monitoring/api/metrics_gcp#serviceruntime/quota/allocation/usage
https://cloud.google.com/monitoring/api/metrics_gcp#serviceruntime/quota/exceeded
https://cloud.google.com/monitoring/api/metrics_gcp#serviceruntime/quota/limit
I am currently building a NodeJS backend app that is querying the Google Calendar API. I have setup a new project on Google Cloud API platform and have generated all the required credentials. As stated by the google calendar API page, the allowed queries per day is 1,000,000. Since I am only querying for testing purposes at the moment, I am sure that I haven't even hit a 100. Yet whenever I try to query the API it returns the error:
"The API returned an error: Error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
Also I have noticed that the dev console has generated a API key for me. Where am I supposed to put that?
My initial thinking is that Google API requires me to perform an additional signup using some CLI tools or something along those lines to signup. If not, where am I supposed to sign up?
Thanks in advance.
Note: I already have all the information from the cloud platform such as client_id, client_secret, project_id.
In "Error: Daily Limit for Unauthenticated Use Exceeded", they key word is Unauthenticated. Your request to the Calendar API is missing an OAuth Access Token. You will need to research Google OAuth.
This question has been answered many times. Please learn how to search SO for similar questions whenever you post a new question. https://stackoverflow.com/search?q=google+oauth+%22daily+limit+for+unauthenticated%22
To anyone who comes across this post in the future. I fixed the issue by using the project generated by Google Calendar API site (https://developers.google.com/calendar/quickstart/nodejs) by clicked the big blue "Enable the google calendar api" and then changing the name of the quickstart project that was generated. I don't know why it works now but it does and it's been working quite stably so far. Lets see how to goes.
I am using Google API to get the place information and store it into database. Using Google API I am able to get address, opening hours, rating and reviews as shown in below image.
But, I am not able to get place description which is highlighted in below image in red circle. ("Quaint Italian mainstay for deep-dish, Chicago-style pizza, calzones, pastas & hot dogs.")
I want that information in my application. I think google is taking those information from
Freebase https://developers.google.com/freebase/guide/basic_concepts
Wikipedia https://www.mediawiki.org/wiki/How_to_contribute
But I am not sure.
Can any one help me suggest me that how I can get that information or any other API that I can use to get that information based on google place_id.
Any help would be highly appreciated.
Thank you
Accordingly to the documentation and #xomena, currently you cannot obtain this data via Places API. There is a feature request in Google issue tracker to make the detailed business type available in Places API, however Google doesn't expose any ETA (estimation time of arrival:
https://issuetracker.google.com/issues/35822953
Feel free to star this feature request to express your interest and subscribe to notification from Google.
To my knowledge it is not possible to get this information from the Google Places API. The API documentation does not display the venue description. Try to have a look here: https://developers.google.com/places/web-service/details (it might be that Google does not share all information from their platform with other developers..).
I would suggest you to do one of the following (or perhaps both):
Scrape Google the old school way; i.e. by getting the information from the HTML. There is a quite decent guide for doing that here (you would of course have to adjust the example to scraping Google instead): https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe.
What I would recommend and which probably is the fastest: enrich your current data with other data. You could e.g. use Foursquare and search for the places you get from Google. It should be possible to get the description for each place on Foursquare. See here: https://developer.foursquare.com/docs/api/venues/details. If you have problems with matching the places after your query has returned, because the venue names are not exactly the same - but close, then you could use an algorithm to match strings that are close; perhaps using the levenstein distance (https://en.wikipedia.org/wiki/Levenshtein_distance).
As of today (5/25/2016) there seems to no longer be data for user_ratings_total in the Google Places API. I use this to get the total number of reviews for a business. Is there an alternative method to getting this data?
If you would like Google to reinstate the previously undocumented user_ratings_total result key (or something similar), then please go to: https://code.google.com/p/gmaps-api-issues/issues/detail?id=3484 and add your vote for this feature to be officially added.
This issue was "Acknowledged" by Google way back on Jun 3, 2013 and is still open as such (other similar issues like https://code.google.com/p/gmaps-api-issues/issues/detail?id=9824 have been "closed" with status like "WorkingAsIntended").
Hopefully if we get enough up votes then maybe they will see the need and put it back in and make it official (as opposed to undocumented).
(Unfortunately I couldn't post this as a Comment as I just registered; so I'm going to post it as an Answer and hope it is okay.)
I'd try the Google My Business API, see in particular the documentation section Work with Review Data.
You'll need to Request access to the API.
This is fixed now. Reposting a comment from the issue linked to above by #TechLeadAA
The total amount of ratings is now generally available for all Places
API clients as part of the Basic SKU:
https://developers.google.com/places/web-service/details#fields
https://developers.google.com/places/web-service/place-data-fields#basic
Places API: user_ratings_total
Places SDK for iOS: GMSPlaceFieldUserRatingsTotal
Places SDK for Android: Place.Field.USER_RATINGS_TOTAL
I'm facing the same issue, and it looks like total number of reviews from Google Places API is not the same as Google My Business API:
[https://www.en.advertisercommunity.com/t5/Google-My-Business-API/Total-Reviews-are-no-longer-getting-in-Google-Places-API-and/td-p/573090#][1]
I'm trying to query Google Global Address List for a specific domain, being led by this answer here (Specifically the answer by Jay Lee).
It's all well and good and works perfectly in Google's OAuth Playground, however it seems to be limited to 250 users. Given that this feature seems completely undocumented, and that I can't tell by looking at their github repo (specifically this file), does anyone know how to query for the next 250 users or how to set the number of results?
Thank you!