Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How can I find my Signing Certificate Fingerprint (SHA1)

Discussion in 'Android' started by Nomad_Artisan, Apr 23, 2014.

  1. Nomad_Artisan

    Nomad_Artisan

    Joined:
    Jun 29, 2013
    Posts:
    20
    When setting up my client ID settings on the Google Developer Console, it prompted me to enter my 'Signing Certificate Fingerprint (SHA1)'.

    Where can I find this signing certificate fingerprint?

    Also,
    I've been working under the assumption that this is the same as the Keystore you create under Publishing Settings.
    Is this correct?
    I've successfully created a keystore, but I have no idea how to view it.

    Thank you for any help!
     
    Marloxo likes this.
  2. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    about what client ID are you talking about? For configuring Google Play Services?

    Edit:

    To get the release certificate fingerprint:

    keytool -exportcert \
    -alias <your-key-name> \
    -keystore <path-to-production-keystore> \
    -list -v
    To get the debug certificate fingerprint:
    keytool -exportcert \
    -alias androiddebugkey \
    -keystore <path-to-debug-keystore> \
    -list -v

    reference: https://developers.google.com/games/services/console/enabling#b_create_a_client_id
     
    Last edited: Apr 23, 2014
  3. Nomad_Artisan

    Nomad_Artisan

    Joined:
    Jun 29, 2013
    Posts:
    20
    I don't know enough to understand that list of steps.
    However, I got it working. I didn't realize you had to have an apk of the game uploaded when you were authorizing the app on the google developer console. As soon as I uploaded an apk, the developer console filled in the SHA1 automatically
     
    SaphalAryal, JairoGLoz and john-jds like this.
  4. vekkna

    vekkna

    Joined:
    Apr 6, 2014
    Posts:
    6
    The following steps worked for me.

    In the Unity editor open File -> Build Settings.
    Open Player Settings and in the inspector open the Publishing Setting tab.
    Click on Create new keystore, then Browse keystore.
    Save the file that is created, it should be in your project folder.
    Enter a password.
    In the Alias dropdown, create a new key.
    Fill in the form that pops up.

    Next, search your computer for keytool.exe.
    Open a terminal window in keytool's folder and type the commands.

    For example:

    keytool -exportcert -alias examplealias -keystore D:\mygames\mygame\user.keystore -list -v.

    You'll be asked for the password.

    This should print the info to the console.

    Hope this helps.
     
  5. tungnguyendev

    tungnguyendev

    Joined:
    Mar 26, 2014
    Posts:
    13
  6. polaroceanfire

    polaroceanfire

    Joined:
    Oct 6, 2015
    Posts:
    1
    If you end up having an issue with this, make sure none of the folders in your directory string have a space, or you will get command prompt errors. I just ran into this problem, removed the space, and everything works~
     
  7. thetsquaredx

    thetsquaredx

    Joined:
    Dec 3, 2019
    Posts:
    2
    C:\Users\dell>cd C:\Program Files\Java\jdk1.8.0_181\bin

    C:\Program Files\Java\jdk1.8.0_181\bin>keytool -list -keystore C:\Users\dell\Desktop\Test\KeyStore.keystore
     
  8. WaqasGameDev

    WaqasGameDev

    Joined:
    Apr 17, 2020
    Posts:
    118
    Just a little sharing of what I faced. I was able to trace the file and open it but when opening the file, it asked me for password which I was typing but nothing was shown on terminal at all. So I thought if password is not being typed. But this was being typed! and when I hit enter, the SHA1 was shown.
     
  9. funnyhackers6

    funnyhackers6

    Joined:
    Jul 25, 2020
    Posts:
    1
    GabrielMachadoGomes likes this.
  10. dweeh

    dweeh

    Joined:
    Mar 20, 2018
    Posts:
    46
  11. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,952
    Here is our tutorial on how to get the SHA fingerprint for authenticating Google play services.
    Note that, the SHA fingerprint keeps changing based on the keystore you use.
    If you build your apk/aab in
    1. Debug/Development mode : Default debug.keystore will be used
    2. Release mode: The keystore you set in the unity inspector will be used
    3. Production/Google Play : The apk downloaded from the google play has its own keystore and you can find the sha fingerprint in App Signing section.

    How many SHA fingerprints I need to add for successful authentication?

    It's always handy to add multiple sha's from different build modes as it helps to test locally instead of always downloading from play store.

    Alternatively, if you have the apk with you, you can quickly check the sha of it with below command

    keytool -printcert -jarfile PATH_TO_APK
     
  12. SuurflieG

    SuurflieG

    Joined:
    Sep 26, 2018
    Posts:
    3
  13. aaron4202

    aaron4202

    Joined:
    Apr 9, 2021
    Posts:
    2
    For anybody having this problem download KeyStore Explorer. You can open up your key with the pass, double click it to view certificates. I stumbled on this and it was a life saver, hope it helps someone else
     
  14. Wilson_Muts

    Wilson_Muts

    Joined:
    Jun 30, 2021
    Posts:
    1

    It really helped, THANKS
     
  15. otar2009

    otar2009

    Joined:
    Sep 11, 2022
    Posts:
    1
    For anyone still having trouble with it just write this into command promt
    keytool -alias (your alias) -keystore (your keystore file directory) -list -v

    and its gonna fail if there is any spaces in any of the directories
     
    rasit_akgul likes this.
  16. rasit_akgul

    rasit_akgul

    Joined:
    Feb 23, 2021
    Posts:
    5
    thank you so much, it works!!
     
  17. Jontac

    Jontac

    Joined:
    Feb 6, 2019
    Posts:
    33
    When I do this I only get a respons that "keytool error: java.lang.Exception: Only one command us allowed: both -exportcert and -list were specified"
     
  18. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,952
    Try this
    Code (CSharp):
    1. keytool -exportcert -keystore YOUR_KEY_STORE_PATH -list -v
    Example
    Code (CSharp):
    1. keytool -exportcert -keystore essentialkit.keystore -list -v
    If you already have your apk with you, you can give a try with below
    Code (CSharp):
    1. keytool -printcert -jarfile PATH_TO_APK