# Adding your SHA-1 Key

### Get SHA1 key for debug apk

* Open settings in android studio
* Tick on Configure all Gradle tasks and apply it
* Sync project again and wait for complete it
* Make signing report by double click on signingReport
* Copy the sha1 key
* Pase it to firebase as steps in below

<figure><img src="/files/YRVZRApQIzqfX6YTkPpi" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/87BuQAw1wh4JwjVHrss1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ArdgShOPXioRrVbPmr8v" alt=""><figcaption></figcaption></figure>

### Get SHA1 key for release apk

{% hint style="warning" %}
if you did NOT add your SHA-1 Key you will face some errors while verifying Phone Number
{% endhint %}

1. go to Android Studio > Build > Generate Signed APK > (choose APK if prompted) > then create a New Key and fill in the needed information.

{% hint style="info" %}
you can skip step 1 if you already have `.jks` key.
{% endhint %}

2. after getting your `jks` key open the folder `Firebase Console - Files\Generate SHA1 Fingerprint Tool` then choose your OS type (x86 or x64) and open the file `release.bat` (make sure that you have [Java JDK](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) Installed)
3. it will ask you for `key alias` that you have set when generating the `.jks` key

{% hint style="info" %}
if you did not define key alias the default key alias would be `key0`
{% endhint %}

4. you have to either type the key path like: `D:\Folder\key.jks` or simply drag and drop it
5. then you have to enter the key passowrd that you have set for the key ,the tool will show nothing as you type to make it more secure.

finally hit enter and you will get the SHA1 Fingerprint like this ![image](https://fireapp-docs.devlomi.com/images/firebase-getting-started-8.png)

**Please make sure that you got SHA-1 NOT SHA-256**, if for some reason you've got SHA-256, search for 'keytool' in Java directory and execute the command:

```terminal
keytool -list -v -keystore <your_keystore_jks_file_path> -alias <your_alias_name>
```

copy the SHA1 key and go to your Firebase Project Console and click on little Gear icon > Project Settings >General ![image](https://fireapp-docs.devlomi.com/images/firebase-getting-started-9.png)

scroll down and you will find your package name, click on `Add Fingerprint` and paste in the SHA1 key that you've copied before. then click save

![image](https://fireapp-docs.devlomi.com/images/firebase-getting-started-10.png)

### Get SHA1 Key From Google Play Store

if you want to upload your app to Google Play Store then you have to get your SHA1 Fingerprint From Google Play Console after Uploading your APK .

to do so go to Google Play Console > Release Management > App Signing > you will see your keys like this

![image](https://fireapp-docs.devlomi.com/images/sha1-google-play.png)

copy SHA-1 Keys (App Signing & Upload Certifcates) and paste them in Firebase Console as you've done in [Adding your SHA-1 Key](/superchat_doc/get-started/adding-your-sha-1-key.md)

more info in [this article](https://medium.com/@johanesriandy/authorization-issue-with-firebase-when-publish-app-to-play-store-7a3e1ec03de8)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://teamxdevelopers.gitbook.io/superchat_doc/get-started/adding-your-sha-1-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
