Open Android Studio
Open project folder and go to the Terminal. Copy the below command and paste it and hit enter.
For Mac
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
For Windows
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Note : If you still can't find SHA-1 key, Please follow the Link and complete the setup as asked.
If you're setting up a new Android Studio, follow these steps to generate the "SHA1" key. (For Window)
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
This way you can get SHA-1 key
Go to the Google Play Console.
Log in with the Google account associated with your developer account.
In the Play Console dashboard, select the app for which you need the SHA-1 key.
In the left-side menu, Click on Test and release section.
Expand the Setup section.
Then click on App Signing and copy your SHA-1.