Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Referrer limit per google-maps api key

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!

like image 394
solotherm Avatar asked Jan 06 '23 05:01

solotherm


2 Answers

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).

like image 101
Nicolas Adrian Avatar answered May 19 '23 19:05

Nicolas Adrian


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!

like image 31
xomena Avatar answered May 19 '23 19:05

xomena