Where to get google api key. Installation and API keys

To use the Geocoding API, you must get an API key which you can then add to your mobile app, website, or web server. The API key is used to track API requests associated with your project for usage and billing. To learn more about API keys, see the and the .

Reminder: To use the Geocoding API, you must get an API key and you must enable billing. You can enable billing when you get your API key (see the ) or as a separate process (see ).

Note: Before moving your mobile app, website, or web server to production, it is recommended that you secure your API key by adding a restriction (see ). Console Quick guide Step 1: Get an API key

Click the button below, to get an API key using the . You will be asked to (1) pick one or more products, (2) select or create a project, and (3) set up a billing account. Once your API key is created you will be prompted to restrict the key"s usage. (For more information, see.)

Get Started Step 2: Add the API key to your request

When loading the Geocoding API, substitute YOUR_API_KEY in the code below with the API key you got from the previous step.

Https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheater+Parkway,+Mountain+View,+CA&key= YOUR_API_KEY Detailed guide

Detailed guide for Premium Plan customers

To use the Geocoding API, you must authenticate requests using either an API key or

Choosing an authentication method for your application

  • The authentication method you choose is based on your license:
  • Customers with the can use an API key or a client ID and digital signature. Customers with a must use

a client ID and digital signature.
Have the Premium Plan or a previous license? To determine which
license you have:
> In the Google Cloud Support Portal, click Maps: Usage Report on the left.
> Does the ID at the top of the report have the following format? gme-[ company ]&proj-[] ([number])
type
If yes, you have the .

If no, you have a (Maps APIs for Work or Maps API for Business).

  • When deciding which authentication method to use, consider the following:
    Authentication using an API key (Premium Plan license)
    • By using an API key to authenticate your applications, you can:
    • Manage all of your APIs in the Google Cloud Platform Console.
    • Google Cloud Support Portal.
  • Authentication using a client ID and digital signature (Premium Plan or previous license)
    By using your client ID and digital signature to authenticate your application, you can:
    • Add the channel parameter to requests so you can view more detailed usage reports.
    • View usage reports with more than 30 days of data in the Google Cloud Support Portal.
    • Use Maps Analytics tools for the Maps JavaScript API.
Authenticating your application using an API key Note: For customers with the Premium Plan license.

Follow these steps to get an API key and add restrictions:

Authenticating your application using a client ID and digital signature Note: For customers with the Premium Plan or previous license.

#!/usr/bin/python # -*- coding: utf-8 -*- """ Signs a URL using a URL signing secret """ import hashlib import hmac import base64 import urlparse def sign_url(input_url=None, secret =None): """ Sign a request URL with a URL signing secret. Usage: from urlsigner import sign_url signed_url = sign_url(input_url=my_url, secret=SECRET) Args: input_url - The URL to sign secret - Your URL signing secret Returns : The signed request URL """ if not input_url or not secret: raise Exception("Both input_url and secret are required") url = urlparse.urlparse(input_url) # We only need to sign the path+query part of the string url_to_sign = url.path + "?" + url.query # Decode the private key into its binary format # We need to decode the URL-encoded private key decoded_key = base64.urlsafe_b64decode(secret) # Create a signature using the private key and the URL-encoded # string using HMAC SHA1 . This signature will be binary.

Import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.util.Base64; // JDK 1.8 only - older versions may need to use Apache Commons or similar. import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.net.URL; import java.io.BufferedReader; import java.io.InputStreamReader; public class UrlSigner ( // Note: Generally, you should store your private key someplace safe // and read them into your code private static String keyString = "YOUR_PRIVATE_KEY"; // The URL shown in these examples is a static URL which should already // be URL-encoded. In practice, you will likely have code // which assembles your URL from user or web service input // and plugs those values ​​into its parameters. private static String urlString = "YOUR_URL_TO_SIGN"; stores the binary key, which is computed from the string (Base64) key private static byte key; public static void main(String args) throws IOException, InvalidKeyException, NoSuchAlgorithmException, URISyntaxException ( BufferedReader input = new BufferedReader(new InputStreamReader(System.in) ); String inputUrl, inputKey = null; // For testing purposes, allow user input for the URL. // If no input is entered, use the static URL defined above. System.out.println("Enter the URL (must be) URL-encoded) to sign: "); inputUrl = input.readLine();= new URL(inputUrl); // For testing purposes, allow user input for the private key.// If no input is entered, use the static key defined above.

System.out.println("Enter the Private key to sign the URL: ");

inputKey = input.readLine();

"use strict" const crypto = require("crypto"); const url = require("url"); /** * Convert from "web safe" base64 to true base64.

* * @param (string) safeEncodedString The code you want to translate * from a web safe form.

* @return (string) */ function removeWebSafe(safeEncodedString) ( return safeEncodedString.replace(/-/g, "+").replace(/_/g, "/"); ) /** * Convert from true base64 to "web safe" base64 * * @param (string) encodedString The code you want to translate to a * web safe form.

Using System; using System.Collections.Generic; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using System.Web; namespace SignUrl ( public struct GoogleSignedUrl ( public static string Sign(string url, string keyString) ( ASCIIEncoding encoding = new ASCIIEncoding(); // converting key to bytes will throw an exception, need to replace "-" and "_" characters first . string usablePrivateKey = keyString.Replace("-", "+").Replace("_", "/"); byte privateKeyBytes = Convert.FromBase64String(usablePrivateKey); encoding.GetBytes(uri.LocalPath + uri.Query); // compute the hash HMACSHA1 algorithm = new HMACSHA1(privateKeyBytes); byte hash = algorithm.ComputeHash(encodedPathAndQueryBytes); // convert the bytes to string and make url-safe by replacing "+" and "/" characters string signature = Convert.ToBase64String(hash).Replace("+", "-").Replace("/", "_"); . return uri.Scheme+"://"+uri.Host+uri.LocalPath + uri.Query +"&signature=" + signature ) ) class Program ( static void Main() ( // Note: Generally, you should store your private key someplace safe // and read them into your code const string keyString = "YOUR_PRIVATE_KEY";

// The URL shown in these examples is a static URL which should already // be URL-encoded. In practice, you will likely have code // which assembles your URL from user or web service input // and plugs those values ​​into its parameters.

  • const string urlString = "YOUR_URL_TO_SIGN";
  • string inputUrl = null;
  • string inputKey = null;
  • Console.WriteLine("Enter the URL (must be URL-encoded) to sign: ");
  • Full Signed URL: https://maps.googleapis.com/maps/api/geocode/json?address=New+York&client= clientID &signature=chaRF2hTJKOScPr-RQCEhZbSzIE=
Examples in additional languages

Examples that cover more languages ​​are available in the url-signing project.

More about your private cryptographic key

Your private cryptographic URL-signing key will be issued with your client ID and is a "secret shared key" between you and Google. This signing key is yours alone and is unique to your client ID. For that reason, please keep your signing key secure.

This key should not be passed within any requests, stored on any websites, or posted to any public forum. Anyone obtaining this signing key could spoof requests using your identity.

Note: This private cryptographic signing key is not the same as the API keys issued by the Google Cloud Platform Console.

If you"ve lost your private cryptographic key, log in to the Google Cloud Support Portal and click Maps: Manage Client ID to retrieve it.

Restricting an API key

Google Maps APIs are available via HTTP web services, for web browsers, and Android or iOS apps.

APIs in any platform can use an unrestricted API key. You can optionally add a restriction (for example, IP addresses) to the API key. Once restricted, a key will only work on platforms that support that type of restriction.

Note: Before moving your app or website to production, it is recommended that you secure your API key by adding a restriction. To learn more, see the and Securing an API key.

To add restrictions to an API key, do the following:

Troubleshooting authentication issues

If your request is malformed or supplies an invalid signature, the Geocoding API returns an HTTP 403 (Forbidden) error.

To troubleshoot individual URLs, you can use the URL Signing Debugger .

It allows you to quickly validate a URL and signature generated by your application.

For the correct operation of all Google applications (services), authentication is required, which involves obtaining a unique API key.

Until the end of 2016, it was still possible to use services such as Google Maps without using an API key, but now all new users are required to obtain one.

If you want to add a new Google map to your site, you will need an API key. In today's article, we'll take a detailed look at the practical steps required to obtain a Google Maps API key.

Obtaining a Google API key

There are many application programming interfaces (APIs) that are supported by Google Developers. If you want to place Google Maps on your website, then you need a Google Maps JavaScript API key.

Note: The Google Maps JavaScript API is divided into two pricing plans - Standard and Premium. For most sites, the standard plan is suitable, which provides free access to 25,000 map downloads (views) per day. If the views are more than 25,000 and less than 100,000, then you will need to pay approximately $0.50 per 1,000 additional views. If your site generates traffic of more than 100 thousand map views per day, then you will need a Premium plan.

Let's get started and add a Google map to your site.

The first step will be getting API Google Maps key. To do this you will need any account Google entry(it's free; if you use email Google GMail- that means you already have it).

Sign in to your Google account and go to the Google Maps JavaScript API page.

Scroll down a little and then click the big blue “Get a key” button.

This will open a lightbox form for creating a key. In the drop-down list you can select from existing projects, or create a new one. Let's create a new project, for this you need to select + Create a new project in the drop-down list. Enter a project name that makes sense to you and click Next. If this is your new project, you will need to agree to Google's terms of service to continue.

After a few seconds, you will see the generated Google Maps API key (this will be a set of numbers and letters consisting of 40 characters). Copy it and save it somewhere accessible for later use.

Google Maps API Key Protection

The next step is to improve the security of your new application. To do this, click the API Console link under the field with your API key. A new window will open where you can restrict your API key to be used on your website only. This means that only you will be able to use the key, and this will protect the key from use by an unauthorized user (thereby saving you money).

To display maps on your site, select the HTTP referral sources (websites) option.

A field will open below to add allowed domains. Add them in the required format: *.DOMAIN.com/* . Replace DOMAIN.com with your domain.

Asterisks and slashes must be specified this way (this will allow all pages of all subdomains of your site). If you need to add multiple domains, enter them on a new line below, one domain at a time.

How to use the key

To add a Google Map to your site, you can use an iframe or JavaScript code. In both cases you will need a key. More detailed information How to add your site to Google maps is described.

Inserting a Google map with using JavaScript looks something like this:

Replace YOUR_API_KEY with the previously received key and your card should work!

We hope this short tutorial will help you easily create a Google Maps API key and enjoy Google Maps on your website. Feel free to share your thoughts in the comments below.

To use the Geocoding API, you must get an API key which you can then add to your mobile app, website, or web server. The API key is used to track API requests associated with your project for usage and billing. To learn more about API keys, see the and the .

Reminder: To use the Geocoding API, you must get an API key and you must enable billing. You can enable billing when you get your API key (see the ) or as a separate process (see ).

Note: Before moving your mobile app, website, or web server to production, it is recommended that you secure your API key by adding a restriction (see ). Console Quick guide Step 1: Get an API key

Click the button below, to get an API key using the . You will be asked to (1) pick one or more products, (2) select or create a project, and (3) set up a billing account. Once your API key is created you will be prompted to restrict the key"s usage. (For more information, see.)

Get Started Step 2: Add the API key to your request

When loading the Geocoding API, substitute YOUR_API_KEY in the code below with the API key you got from the previous step.

Https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheater+Parkway,+Mountain+View,+CA&key= YOUR_API_KEY Detailed guide

Detailed guide for Premium Plan customers

To use the Geocoding API, you must authenticate requests using either an API key or

Choosing an authentication method for your application

  • The authentication method you choose is based on your license:
  • Customers with a must use a client ID and digital signature.

a client ID and digital signature.
To determine which license you have:
license you have:
> In the Google Cloud Support Portal, click Maps: Usage Report on the left.
> Does the ID at the top of the report have the following format? gme-[ company ]&proj-[] ([number])
type
If yes, you have the .

If no, you have a (Maps APIs for Work or Maps API for Business).

  • When deciding which authentication method to use, consider the following:
    Authentication using an API key (Premium Plan license)
    • By using an API key to authenticate your applications, you can:
    • Manage all of your APIs in the Google Cloud Platform Console.
    • Google Cloud Support Portal.
  • Authentication using a client ID and digital signature (Premium Plan or previous license)
    By using your client ID and digital signature to authenticate your application, you can:
    • Add the channel parameter to requests so you can view more detailed usage reports.
    • View usage reports with more than 30 days of data in the Google Cloud Support Portal.
    • Use Maps Analytics tools for the Maps JavaScript API.
Authenticating your application using an API key Note: For customers with the Premium Plan license.

Follow these steps to get an API key and add restrictions:

Authenticating your application using a client ID and digital signature Note: For customers with the Premium Plan or previous license.

#!/usr/bin/python # -*- coding: utf-8 -*- """ Signs a URL using a URL signing secret """ import hashlib import hmac import base64 import urlparse def sign_url(input_url=None, secret =None): """ Sign a request URL with a URL signing secret. Usage: from urlsigner import sign_url signed_url = sign_url(input_url=my_url, secret=SECRET) Args: input_url - The URL to sign secret - Your URL signing secret Returns : The signed request URL """ if not input_url or not secret: raise Exception("Both input_url and secret are required") url = urlparse.urlparse(input_url) # We only need to sign the path+query part of the string url_to_sign = url.path + "?" + url.query # Decode the private key into its binary format # We need to decode the URL-encoded private key decoded_key = base64.urlsafe_b64decode(secret) # Create a signature using the private key and the URL-encoded # string using HMAC SHA1 . This signature will be binary.

Import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.util.Base64; // JDK 1.8 only - older versions may need to use Apache Commons or similar. import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.net.URL; import java.io.BufferedReader; import java.io.InputStreamReader; public class UrlSigner ( // Note: Generally, you should store your private key someplace safe // and read them into your code private static String keyString = "YOUR_PRIVATE_KEY"; // The URL shown in these examples is a static URL which should already // be URL-encoded. In practice, you will likely have code // which assembles your URL from user or web service input // and plugs those values ​​into its parameters. private static String urlString = "YOUR_URL_TO_SIGN"; stores the binary key, which is computed from the string (Base64) key private static byte key; public static void main(String args) throws IOException, InvalidKeyException, NoSuchAlgorithmException, URISyntaxException ( BufferedReader input = new BufferedReader(new InputStreamReader(System.in) ); String inputUrl, inputKey = null; // For testing purposes, allow user input for the URL. // If no input is entered, use the static URL defined above. System.out.println("Enter the URL (must be) URL-encoded) to sign: "); " + query; // Get an HMAC-SHA1 signing key from the raw key bytes SecretKeySpec sha1Key = new SecretKeySpec(key, "HmacSHA1"); // Get an HMAC-SHA1 Mac instance and initialize it with the HMAC-SHA1 key Mac mac = Mac.getInstance("HmacSHA1"); // compute the binary signature for the request byte sigBytes = mac.doFinal(resource.getBytes()); // base 64 encode the binary signature / / Base64 is JDK 1.8 only - older versions may need to use Apache Commons or similar. String signature = Base64.getEncoder().encodeToString(sigBytes); // convert the signature to "web safe" base 64 signature = signature.replace( "+", "-"); signature = signature.replace("/", "_"); return resource + "&signature=" + signature;

System.out.println("Enter the Private key to sign the URL: ");

inputKey = input.readLine();

"use strict" const crypto = require("crypto"); const url = require("url"); /** * Convert from "web safe" base64 to true base64.

* * @param (string) safeEncodedString The code you want to translate * from a web safe form.

* @return (string) */ function removeWebSafe(safeEncodedString) ( return safeEncodedString.replace(/-/g, "+").replace(/_/g, "/"); ) /** * Convert from true base64 to "web safe" base64 * * @param (string) encodedString The code you want to translate to a * web safe form.

Using System; using System.Collections.Generic; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using System.Web; namespace SignUrl ( public struct GoogleSignedUrl ( public static string Sign(string url, string keyString) ( ASCIIEncoding encoding = new ASCIIEncoding(); // converting key to bytes will throw an exception, need to replace "-" and "_" characters first . string usablePrivateKey = keyString.Replace("-", "+").Replace("_", "/"); byte privateKeyBytes = Convert.FromBase64String(usablePrivateKey); encoding.GetBytes(uri.LocalPath + uri.Query); // compute the hash HMACSHA1 algorithm = new HMACSHA1(privateKeyBytes); byte hash = algorithm.ComputeHash(encodedPathAndQueryBytes); // convert the bytes to string and make url-safe by replacing "+" and "/" characters string signature = Convert.ToBase64String(hash).Replace("+", "-").Replace("/", "_"); . return uri.Scheme+"://"+uri.Host+uri.LocalPath + uri.Query +"&signature=" + signature ) ) class Program ( static void Main() ( // Note: Generally, you should store your private key someplace safe // and read them into your code const string keyString = "YOUR_PRIVATE_KEY";

// The URL shown in these examples is a static URL which should already // be URL-encoded. In practice, you will likely have code // which assembles your URL from user or web service input // and plugs those values ​​into its parameters.

  • const string urlString = "YOUR_URL_TO_SIGN";
  • string inputUrl = null;
  • string inputKey = null;
  • Console.WriteLine("Enter the URL (must be URL-encoded) to sign: ");
  • Full Signed URL: https://maps.googleapis.com/maps/api/geocode/json?address=New+York&client= clientID &signature=chaRF2hTJKOScPr-RQCEhZbSzIE=
Examples in additional languages

Examples that cover more languages ​​are available in the url-signing project.

More about your private cryptographic key

Your private cryptographic URL-signing key will be issued with your client ID and is a "secret shared key" between you and Google. This signing key is yours alone and is unique to your client ID. For that reason, please keep your signing key secure.

This key should not be passed within any requests, stored on any websites, or posted to any public forum. Anyone obtaining this signing key could spoof requests using your identity.

Note: This private cryptographic signing key is not the same as the API keys issued by the Google Cloud Platform Console.

If you"ve lost your private cryptographic key, log in to the Google Cloud Support Portal and click Maps: Manage Client ID to retrieve it.

Restricting an API key

Google Maps APIs are available via HTTP web services, for web browsers, and Android or iOS apps.

APIs in any platform can use an unrestricted API key. You can optionally add a restriction (for example, IP addresses) to the API key. Once restricted, a key will only work on platforms that support that type of restriction.

Note: Before moving your app or website to production, it is recommended that you secure your API key by adding a restriction. To learn more, see the and Securing an API key.

To add restrictions to an API key, do the following:

Troubleshooting authentication issues

If your request is malformed or supplies an invalid signature, the Geocoding API returns an HTTP 403 (Forbidden) error.

To troubleshoot individual URLs, you can use the URL Signing Debugger .

For the convenience of many players, EVE developers have created an api for the ability to access/post account information on other resources. Many serious corporations require the provision of a key before accepting a player. In this article we will try to tell you what an Eve API key is, how to get it and what you can do with it.

What is an API key? How can I use it?

An API key is a private code that identifies your account and allows you to third party programs and websites, access information about your characters and corporations. Using this data, such utilities can help provide timely alerts about events that are important to you, ranging from interactions with gaming functionality(sales/calendar events/plans/ship status, etc.), ending with interaction with other players.

It is safe? Can someone access my account without my knowledge?

It's safe, other sites and applications have access to information about your account as long as you give consent. Those. You can deny this access at any time if you doubt the security of the resource on which you provided your information. You can also control what information will be available to other users using the API key that you created.

Using an API key does not give people access to your account. This is the purpose of API keys. The API key only allows you to view (read) character and corporation data. They won't be able to log into the game, change your password, or otherwise hack your account.

This is the only secure way to give programs and websites access to your data.

I still don't trust it.

If you are not sure that a website or program that is asking for an API key is secure, please do not provide it with your API key! You are solely responsible for any use of information obtained through the API function.

I gave someone my API key and now I want them to not be able to use it!

If you think someone is misusing your API key, you can remove it from the permission list, or simply change the verification code. Please note that all programs and websites that use the old API key will no longer be able to access the data unless you provide them with a new key with updated information.

You can view the API activity on your account using the log. API Access If you believe that someone is misusing one of your API keys, please change the verification code or remove the API key from the list above.

How to create Eve API key?

  • To create a key, follow the link: https://community.eveonline.com/support/api-key/update
  • You will need to log in. Please pay attention to the address before logging in. Only such an address is the address of the OFF site of EVE.
  • After logging in, you will see a window with the following information:
    • Wallet operations
    • Wallet transactions log
    • Market orders
    • Account balance

    Communications

    • Chat channels
    • Notification texts
    • Notifications
    • Postal messages
    • Mailing lists
    • Mail
    • Contact notifications
    • Contact list

    Public Information

    • Character information
    • Final table
    • Awards
    • Kill log
    • War statistics

    Science and Industry

    • Research
    • Industrial activity

    Private Information

    • Bookmarks
    • Coordinates
    • Contracts
    • State of an account
    • Character information
    • Calendar of upcoming events
    • Queue of skills being learned.
    • Skills learned
    • Character Sheet
    • calendar of events
    • List of assets

    Likewise for key type - Corporation. Next, click “submit” and the key will be created. It is immediately ready to use.

    Where is this key used?

    Often this feature is implemented for Corporations (clan sites) and additional. application for the world of EVE. Which simplifies the exchange of information with co-corps members.

    The next step is to increase the security of the new key. In the API console, click the “Credentials” button and go directly to the “API key” link in the console.

    Opens new screen, where you can limit the use of the API to just one website. This means that no unauthorized user can take your API key and then use it on another website, thereby wasting the key's daily allowance on map downloads. Which will probably cost money if billing is included.

    Restricting the use of a key is simple. In the window that opens, find the “Key restrictions” section.


    If you need to display maps on your website, select the “HTTP referral sources (websites)” option.

    This will open a new field to add your domain or domains there. Don't forget to add them in the required format:

    *.example.com/*

    where "example.com" is the name of the site.

    Use an asterisk as a wildcard. If you leave this field empty, requests will be accepted from all sources. Asterisks, slashes, and dots should be formatted the same as in the template.

    If you need to add several domains, you need to add them one at a time in each new line.