Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.google.android.gms.common.api.ApiException: 10

I'm trying to use google sign in sample, but it doesn't work. I receive ApiException statusCode = 10

I use the same code like here https://developers.google.com/identity/sign-in/android/

like image 530
MonStar Avatar asked Jun 17 '26 17:06

MonStar


1 Answers

This is two problems. First, if you add ' .requestIdToken(getString(R.string.server_client_id))', you create web application Oauth2.0 in api console. try reading this 'https://developers.google.com/identity/sign-in/android/start' .

Second, if you not use 'requestIdToken', you create type is android Oauth2.0. Second does not require a clientID but if you add code 'requestIdToken', need to add webapplication clientID.

like image 80
DEVPROG Avatar answered Jun 19 '26 08:06

DEVPROG



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!