Speech API:
It is NOT possible to get additional quota for Chrome's Speech API. Look at the Cloud Speech API instead. Do NOT post to any Chromium groups/mailing lists for questions about the Speech API. This page is about building Chromium. If you have arrived on this page to try to get API keys for some other purpose, you should not follow the instructions on this page. Do NOT post to any Chromium groups/mailing lists to ask how to get quota for an API. The section "Getting Keys for Your Chromium Derivative" below has the same answer you will get from the list. Some features of Chromium use Google APIs, and to access those APIs, either an API Key or a set of OAuth 2.0 tokens is required. Setting up API keys is optional. If you don't do it, the specific APIs using Google services won't work in your custom build, but all other features will run normally. Googlers only: if you need a new API enabled in chrome, use http://b/new?component=165132 You can specify the API keys to use either when you build Chromium, or at runtime using environment variables. First, you need to acquire keys for yourself. Software distribution with keys acquired for yourself is allowed, but the keys themselves cannot be shared with parties outside the legal entity that accepted the API ToS. Keep in mind that a number of the APIs will have no or very limited quota and not all of the APIs have additional quota available for purchase. Acquiring Keys
If any of these APIs are not shown, recheck step 1.
If you are building Chromium yourself, you can provide keys as part of your build configuration, that way they are always baked into your binary. Specify three variables in your args.gn file (which you can edit by running gn args out/your_out_dir_here ) google_api_key = "your_api_key" google_default_client_id = "your_client_id" google_default_client_secret = "your_client_secret" Providing Keys at Runtime If you prefer, you can build a Chromium binary (or use a pre-built Chromium binary) without API keys baked in, and instead provide them at runtime. To do so, set the environment variables GOOGLE_API_KEY, GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET to your "API key", "Client ID" and "Client secret" values respectively. On Chromium OS to specify the keys as environment variables append them to the end of /etc/chrome_dev.conf: GOOGLE_API_KEY=your_api_key GOOGLE_DEFAULT_CLIENT_ID=your_client_id GOOGLE_DEFAULT_CLIENT_SECRET=your_client_secret Rate limit when signing into Google account from Chromium builds Starting with Chromium M69, when the browser is set up with an OAuth 2.0 client ID and client secret, signing in with your Google Account to any Google web property also generates an OAuth 2.0 token for Chromium. As this token gives access to various Google services that handle user data (e.g. Chrome sync), for security and privacy reasons the generation of this OAuth 2.0 token is rate limited. If you are hitting this rate limit, then signing in to any Google web property will also fail as the OAuth 2.0 token cannot be generated. To avoid this error, remove your OAuth 2.0 client ID and client secret from your build to stop generating tokens when users sign in to Google web properties (remove google_default_client_id, google_default_client_secret from gn args and GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET from your environment settings) . Getting Keys for Your Chromium Derivative Many of the Google APIs used by Chromium code are specific to Google Chrome and not intended for use in derived products. In the API Console (http://developers.google.com/console) you may be able to purchase additional quota for some of the APIs listed above. For APIs that do not have a "Pricing" link, additional quota is not available for purchase. As explained in section above, signing in to Google web is rate limited if the developer has configured a client ID and client secret. To avoid hitting this limit in Chromium Derivatives, please remove the OAuth 2.0 client ID and client secret from your build configuration. google_api_key = "your_api_key"
|
For Developers > How-Tos >