Im implementing an android app that enables users to stream to a youtube channel straight from the app. I have created an API key and a OAuth 2.0 client ID
But I ge
In my case the UNREGISTERED_ON_API_CONSOLE error was caused by misspell in package name in AndroidManifest. Simple but lost many hours struggling with keys and SHAs.
The issue is that, when you debug, you're using a keystore created in ~/.android/debug.keystore, and not whatever signing key you think you're using.
When you generate a key, such as to release a signed APK, you think that this SHA1 is the one required by the Google API interface. It isn't.
If you replace the one in the ~/.android folder with your signing key, it's corrupt because it's missing the androiddebugkey. FYI, the default password for the auto-generated key is "android".
For directions as to where your keystore is located, see https://developer.android.com/studio/publish/app-signing.html under "Expiry of the debug certificate".
What you have to do:
1) Delete your debug.keystore and restart your IDE. This should generate a new debug.keystore with key alias "androiddebugkey".
2) If your IDE does not generate the new keystore, re-run your android application. It should generate it this time in ~/.android/
3) Navigate to /path/to/jre/bin and add this path to your system environment variables. This will allow you to access keytool
.
4) Navigate to the directory of your debug keystore and run this command: keytool -list -keystore debug.keystore -alias androiddebugkey
5) Your console will prompt you to enter the keystore password (it is "android").
6) Get the SHA1 key from the keystore and put THAT KEY into your API interface, and you'll find it works.
Using the answers before this, I used it as a reference to understand and fix mine and made a much easier step-by step procedure of how I fixed mine.
In Windows command prompt.
Navigate to you java bin directory.
C:\Program Files\Java\jdk1.8.0_111\bin>
and type the ff. command
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
then run the ff. code
keytool -list -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey
when ask for password, type "android" (without double quotes)
the resulting SHA1 key from the above code. Copy it, and paste it on your google cloud console here
On the google cloud console webpage do this
on the tab on the left, find and click "APIs & Services"
then on the new page, on the left tab again, find and click "Credentials"
now copy paste the key you copied from windows command prompt on the textbox below the "Signing-certificate fingerprint"
make sure that the application id on your app and google cloud console matches each other.
I've this problem, and after a lot of search, in build.gadle
my applicationId
was diferent from the package name that i've putted on Google Console
defaultConfig {
applicationId "br.com.glicado.glicado" <-- WAS WRONG, IN MY CASE THE RIGHT IS "br.com.glicado"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}