Referrer limit per google-maps api key - google-maps

We are providing websites/CMS solutions for more than 2500 customers. Almost all websites have google-map module. So since google changed its map usage policy, from one day to another all those webs had an error on their map modules. We need to come up with some quick (and dirty) solution. We decided to use multiple api-keys, and devide domains between them - alphabetic. And we registered all those 2500+ domains under these keys - manually. One by one.
The solution worked until last week. Now we somehow reached some kind of limit, as we cannot register any new domains/referrers under one of those api-keys. The actual count of domains/referrer of this given api-key: 1537. The saving process yields an error with tracking code (which is every time I try different).
Is there really some kind of limit? Does anyone experienced the same problems. Does some time-economic solution exists?
Thanks for any help or suggestions. Peace!

There is indeed a limit of (at time of writing) about 1,000 referer restrictions per API key. You can create about 100 keys per project, so you can authenticate 100,000 domains with a single project. To proceed further, you can create multiple projects (note that multiple projects can be combined under the same billing account, so you would still receive a single bill).
As a short term fix, you can temporarily remove all restrictions on the key, so that apps relying on that key are functional again. Then you can take the time to release a new key sharding pattern that follows these guidelines.
I just created a feature request so that the situation can be improved, for this use case ("star" it, to be notified of updates).

Google has recently released an alpha version of API that allows manage API keys programmatically.
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
source: https://issuetracker.google.com/issues/35829646#comment12
Hope this helps!

Related

Assuming I have edit access to a Google Sheet, how can I write to it programmatically?

A friend has given me edit access to a Google Sheet he owns. I want to write to it via web server code hosted elsewhere---at Wix, actually, where I've built a page that wants to update the spreadsheet from time to time, perhaps a dozen updates per day.
I have found several technologies that might solve the problem. Google Apps Script is one, the Sheets API another. The latter of these is (as far as I can tell) really three distinct options depending on authentication scheme: API key, service account, or OAuth2.
The question is this: Given my specific situation, which of these four approaches (or others I haven't found) is feasible and most appropriate? I'm not asking for opinions; I just don't want to go down one path only to learn later that it's an unworkable dead end (as preliminary research suggests that API key might be) or absurd overkill (as preliminary research suggests that OAuth2 with a Google-approved app might be). Note in particular that I have edit access to the spreadsheet in question and can give that access to others if necessary. If the choice depends on factors I haven't mentioned, what are those factors?

Is it possible to see what domains are using a Google API Key?

I've had a major spike in my Google API usage. Because many of my sites share the same key, I was hoping to see a sorted list of where the API calls are coming from. I haven't managed to find how to do that in the Google API Console. I know that you can restrict the keys to specific domains, but that's not realistic with hundreds of domains.
In the mean time I've regenerated the keys and deployed them in case they've been co-opted by someone else. If anyone has any insight, I'd really appreciate it. Thanks.
You can do this for all future requests but not for past ones. Google recently implemented a channel parameter in requests. You can add a different channel (from 0 to 999) to your requests from different URLs and then filter your billing reports on that channel to see exactly what you are looking for in your billing report moving forward.
https://developers.google.com/maps/reporting/gmp-reporting#usage-tracking-per-channel
Is it possible to see what domains are using a Google API Key?
No its not.
If you want to know where the calls are coming from i would make project for each domain and then create a key. This will mean monitoring 100 google projects and creating billing accounts for each. I dont really see any other way around it though.

Use multiple Google Map Account for websites on the same server

I have one real website using google map and It is binded with several domains. Each domain serves for a separated group of client.
Google map announces new policy updates that apply from 11th june 2018 that decrease free limit usage from 25K map loads per day to 28K map load per month
My questions is Can I use map api key which generated from separated google account to increase free usage ?
I have read this question carefully use multiple Google Maps API Keys for same server?
But link seems broken and I can't find relevant information as answer on that question or some other questions too
In my case, although my sites have the same code based and IP, however they works like different sites on shared hosts. One more thing, Google assigns free usage based on account (not google map key) so I think I can use multiple account to increase limit
So can I do this ? I don't want to break Google rules and I appreciate for any comment
You can not since is against Google terms, please check section 3.2.4.e in this link https://cloud.google.com/maps-platform/terms/#16-limitation-of-liability.
No Circumventing Fees. Customer will not circumvent the applicable Fees. For example, Customer will not create multiple billing accounts or Projects to avoid incurring Fees; prevent Google from accurately calculating Customer’s Service usage levels; abuse any free Service quotas; or offer access to the Services under a “time-sharing” or “service bureau” model.
I'm not sure if it's against the rules:
Google Maps guy said here, that it's OK https://twitter.com/GMapsPlatform/status/1001061642363461633

Determining Use of Google Maps API Key

I'm trying to track down the use of all the Google API keys for an account. There are a few keys which don't have referrer's set and are generically named, but are being used according to the statistics. Is there anyway to determine the referrer/url that is using an existing API key?
FYI, I do know that the referrer should be set, these are keys that weren't created by me or were created many years ago when I was young and stupid. :-)
The only current way for you to know the domains of the API Keys that are being used is to:
Restrict your API Key. By doing so, the other domains will be unable to use the API Key that is not in the list of referrers. See API Key Best Practices or,
Start fresh by creating a new Key and properly restrict it with the domains you are aware of. Then start migrating it to the sites that you built. Then eventually, delete the old key at least until June 11, as that will be the date when the changes will be implemented.
You can also contact Google Cloud Support but you will receive the same answer, as they will not give you the domains if your API Key is unrestricted. Here are also some of the best practices for you:
You can set Budgets Alerts which will notify you if you reach the conditions you set. You can cap your usage by setting consumer quota limits on a per-API basis from the Cloud Console.
I also encourage you to follow the API key best practices and,
Use these strategies detailed on the Optimization Guide

Google Maps Javascript API key

I am using Google Maps JavaScript API, and have obtained an API key for my registered project on the Google site.
I am at a point in my development where I would like to deploy the app to others as well, for more extensive testing.
The API key that I have was obtained by creating a project on googles interface, and also by providing my own work email address. I left the key open without any restrictions.
Can others in my organisation also use this API key to connect to the maps?
What do I do in terms of deployment to production systems, in terms of the key I will use there? We have quite a lot of clients, and I would like detailed information such as how many connections google will allow for this key etc.
The limitation will be applied at the level of your Google account. So It doesn't matter how much clients you have or how much coworkers use it the limitations are global.
You can check these limitations on real time on google console: https://console.developers.google.com/.
The default limits (free API key) are:
25 000 maps loading each 24 hours
50 request per second
It's important to use API key restriction, try applying a DNS restriction if you have only one DNS, but your co-workers or you won't be able to use it if you don't use the DNS.
I'll recommend you to have two API keys one of your clients and one for your coworkers, so you just applied the API key restrictions to your clients. It will also be easier to check usage onto the clients only. The limitation is on your account not your API key anyway.