Can I use Google Drive API without registration my extension on Google Chrome Store?
Yes you can. Your app only needs to be registered in the API Console.
You need to create a Client ID for web applications in the API Console and define callback URLs.
Basically it's about to get oAuth working in the first place... then you can really USE it.
Drive API has to be enabled there, under 'Services'.
UPDATE: This has changed in the meanwhile and was true for Drive API v1.
No.
You can use the Documents List API for that purpose.
Related
my question: Is there any Google API / SDK I can use to be able to dynamically add "HTTP referrers (web sites)" (assign domains) to maps API key ?
Background
I'm building a web-application portal that will allow anyone to create a business website and assign a custom domain to it.
On that generated website customer will have google maps map pointing to address of their business.
Customer has an option to add custom domain to their business website created by my web-application (by CNAME to the my web-application)
Desired feature is that once the domain background job will get triggered that will add that domain/host to list of restricted domains/hosts for my Google Maps Api key so that their domain will be able to read google maps on their domanin
note: I Have cron job DNS lookup validation check implemented to ensure that domain is really assigned to the domain
live example
here is website generated by customer on my web-application http://sbs-sos.sajtka.sk/ he assigned a domain and pointed CNAME http://sbs-sos.sk/
Reason why the google map works is because I manually white-listed their domain. I need to automate this
please aware portal is not fully launched so many bugs are happening
The feature request to manage API keys restrictions via SDK was submitted in Google issue tracker in 2016:
https://issuetracker.google.com/issues/35829646
Currently, there are no any official SDK for that. However, the last update from Google says that they released experimental API to programmatically manage your API Keys and their restrictions.
The best way to handle thousands of authorized domains is to use an API to programmatically manage your API Keys and their restrictions, and we have recently launched a new service that allows you to do this.
This API is still in Alpha. If you are interested in becoming a Trusted Tester for this service, you can use the following form to sign up, please read the instructions carefully:
https://forms.gle/qx2SMcarWCAsbWVp7
Please note that this API is not part of the Google Maps Platform. After you fill out the form, you will be contacted by the API Keys API team with instructions on how to get started, and how to receive support.
API Keys API is currently free of charge. However, please note that use of Cloud Endpoints may be subject to charges at high traffic volume. You can check the pricing sheet here:
https://cloud.google.com/endpoints/pricing-and-quotas
I would suggest joining Trusted Tester program and try out this API.
I hope this helps!
I have used Google maps,places,directions javascript API in my web application. Application loads different places based on user input by making ajax call to the google api. Fortunately Google is able to crawl the ajax lately.
When I was checking the URLs in the Googles webmaster tool 'Fetch as Google' feature, the response is like below
Here is the google maps api robots.txt file
Is google maps api blocking Google bot? in that case please suggest me what would be approach should I follow to to get the page content?
We took contact with Google Maps Support and they confermed it was a bug at their side! However, no statements were made about when we could expect a fix.
I'm using Google Maps API in my application. I want to use Google Drive too. Do I need to create a new key and project in google developer console, or just enable Google Drive?
Just enabling Google Drive would be fine.
According to the console help docs:
a project is a collection of settings, credentials, and metadata about the application or applications you're working on that make use of Google Developer APIs and Google Cloud resources.
So in other words, one project == one app.
https://developers.google.com/console/help/new/?hl=en_US#managing-projects-in-the-developers-console
Hope this help!
I m working on an application which renders google maps on an image as below
<img alt="Google Maps (Scotland)" src="http://maps.google.com/staticmap?size=480x200&maptype=mobile\&markers=55.9368450758,-3.03604939504,reda|55.9454374538,-3.18124534297,redb&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
The map is not getting rendered and when I right click on the source of image and click the url, I get the following message
"The Google Maps API server rejected your request. This site or IP is not authorized to use this API key."
I have checked the API Access on https://code.google.com/apis/console the API key seems to be all correct. Just wondering how to fix the site and IP bit?
See below the settings in google API console
Make sure you have enabled "Static Maps API" service in addition to "Google Maps API".
Make sure you have enabled the Google Maps related Services ("Google Maps Embed API" and "Static Maps API") like bellow:
And then mark them:
In the new layout you find it here:
It works for me when I enable "Google Maps Embed API" and "Static Maps API"
Make sure you have a Browser key in the Simple API Access section, and make sure the Referers is set to Any referer allowed
Activate Google Map Key here: https://console.developers.google.com/apis/api/maps_embed_backend/overview?project=[your-project]
It will enable your map instantly.
I had the same issue. I used this instead of this and that resolved the issue. Some other api parameters didn't work on the second URL either (specifically marker styles), guessing the old API is deprecated
Would also recommend using https as opposed to http. This way your users wont get cert warnings if they view the page over SSL
Not only you need to enable google static API, but also you need to include your api_key in the link.
From june 2018 you have to configure a billing account to continue using Maps static API; google "donate" 200$/day of credit
Maps Static API Usage and Billing
add key in the url is not enough
As commented by Pointy, you need to use an API key with all referrers allowed in order to use Static Maps.
You can achieve that just by removing all the referrers from the list of authorized referrers. Or just create a new API key and use it without further configuration.
More info at the Documentation
I just came to know that DocumentsList API is depricated. So i thought of migrating my app to Drive and saw this page. I mostly use urls like https://docs.google.com/feeds/default/private/full/. So is it enough to replace them with new URL's like this https://www.googleapis.com/drive/v2/files/ ?
Just wanted to confirm is that all i need to takecare or am I missing anything. My App uses OAuth2 for authorization. Do I need to change anything in there too?
If you are constructing the requests yourself, you have to replace the URLs but also take into account that the responses from the Drive API will be JSON-formatted and not XML-formatted as in the Documents List API.
If instead you are using one of the Google-provided client libraries, you have to start using a newer client library, that you can download from https://developers.google.com/drive/downloads.
The migration guide is mostly a guide that maps methods from the Documents List API into methods of the Drive API and should be used as reference to know what is available and where.
Oauth 2.0 is fine. You can even use the same tokens you already have for Documents List v3.