I'm using Google Cloud Endpoints v2 for java. I create endpoints method and restrict it through API. After this, I create API from GCP console.
I'm calling endpoints method from android using client libs. Here is how I'm calling any method.
APIName.Builder builder = new APIName.Builder(AndroidHttp.newCompatibleTransport(), new JacksonFactory(), null);
APIName apiName = builder.build();
apiName .account().checkRegistration(phone).setKey(ApiKey).execute();
And it always give and error.
403 Requests from this Android client application are blocked.
It's seems there is some kind of problem in my sha-1 or in package name I double check everything all are good.
I create sha-1 using this keytool -list -v -keystore "Key store path" -alias "Key Name"
and set into API as shown in image.
Then I also try to get sha-1 through android studio Gradle->AppName->android->signingReport
it give me different sha-1 I also add it and try but still same error.
I add these and wait more than 2 hours still same error.
What I'm doing wrong. ?