Paste in SHA1 key: what? where? how?

Hal Brooks
2 min readJan 13, 2022

Objective: Access the SHA1 key created in Unity for use on Google Console.

Google Maps Platform provides 2D maps for any location, so that the accident location can be recorded when filing an insurance claim. To allow the app to access Google Maps set up a Google Cloud Console account using link below.

https://developers.google.com/maps/gmp-get-started

Once you have an account then create a new project. Provide a project name then setup an API key. To protect your account, restrict the key to Android Apps, which will now require an SHA-1 key for your app. Good practice is to restrict the Android app

To find the SHA-1 key, go to Unity’s project settings > player and open publishing settings. Create new keystore in d:\location\secure. Provide a name name.keystore and secure password. Similarly, create a name for the project, “alias name”, along with another password. These passwords are required to be able to update you app on the Google Play Console. Write them down and place the record where you can find them years later. Now you can create the keystore, and select its path and alias within the publishing settings. Enter those passwords and the project has a keystore or SHA-1 key.

Create Keystore in secure location by assigning password, alias and alias password.

Open the command prompt in Windows 11, by searching for cmd.exe. Navigate to the D drive by typing “D:”, and set the directory using “cd location” and “cd secure”. Once inside the directory with the name.keystore type the following command line:

keytool -exportcert -alias “alias name” -keystore D:\location\secure\name.keystore -list -v

Enter the keystore password, not the alias password. Information about the keystore will be printed to the command console. There is a section called “certificate fingerprints”. Within this section, copy by highlighting the SHA1 signature and pressing “Ctrl+C”, and paste, “Ctrl+V”, into the Google Cloud Platform field for the SHA-1 signature. The API key needed to access Google maps is found in the upper right for your project credentials, and will be used in a later article.

The API Key can later be found under Google Cloud Platform APIs & Services Credential on the left hand side of the screen after selecting your project.

--

--