I\'m having trouble with my first attempt to use authentication in debug mode in a Google Cloud Endpoints android app. I set up credentials like this:
creden
Maybe you have the wrong Certificate fingerprint (SHA1) for your Android Client-Id? The authentication with the fingerprint of your production key works only if you sign the .apk manually.
Register a Client-Id for an Installed Application (Android) with your debug.keystore fingerprint in your API Console. To get the fingerprint use:
C:\>keytool -list -alias androiddebugkey -keystore C:\.android\debug.keystore -storepass android -keypass android
Also you need a Web-Client-Id and set it as Audience in your Android application:
credential = GoogleAccountCredential.usingAudience(this,"server:client_id:" + WEB_CLIENT_ID);
AppEngine Endpoint configuration should look like this:
@Api(
name = "testEndpoint",
version = "v1",
clientIds = {ClientIds.WEB_ID, ClientIds.ANDROID_PRODUCTION_ID, ClientIds.ANDROID_DEBUG_ID},
audiences = {ClientIds.WEB_ID}
)