GoogleCloudPlatform / android-docs-samples

Apache License 2.0
375 stars 596 forks source link

Permission denied? #58

Closed KokJianYu closed 6 years ago

KokJianYu commented 6 years ago

I enabled my cloud speech api, got a service account and downloaded the json and placed it in the /res/raw directory. However, when I try to run the demo. I keep getting a Permission denied error. Any help? I have no idea what is wrong.

01-11 12:15:59.638 22938-23044/com.google.cloud.android.speech E/SpeechService: Error calling the API. io.grpc.StatusRuntimeException: PERMISSION_DENIED: Permission denied: Consumer 'project_number:1082880516923' has been suspended. at io.grpc.Status.asRuntimeException(Status.java:543) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:395) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)

pallaviMN commented 6 years ago

@KokJianYu once its suspended should we reenable by paying the amount?

KokJianYu commented 6 years ago

@pallaviMN yes, my problem was resolved after repaying the amount.

pallaviMN commented 6 years ago

@KokJianYu ok but nowadays when we try to enable initially itself it asks for payment, not giving an option of free usage, so wanted to confirm

KokJianYu commented 6 years ago

@pallaviMN we do have to provide a payment method first before being able to use the API. But they will only charge your card if you exceed the free usage limit if I recall.

pallaviMN commented 6 years ago

@kokjianYu thanks but does it require verification by showing govt id?

KokJianYu commented 6 years ago

@pallaviMN you just need a verified Google account to use the API. Don't remember needing verification through ID.

pallaviMN commented 6 years ago

Yes you are true but nowdays they have made it . Otherwise it shows as account suspended. Soon after enabling billing it asks for verification