How do I use an API Key in Google Speech grpc Java or any other library. For HTTP request I am able to see that we can append key=API_KEY as mentioned in https://cloud.google.com/docs/authentication/api-keys.
But for the given libraries (https://cloud.google.com/speech/docs/reference/libraries#client-libraries-install-java) all examples show how to use the Credential file.
Please help.
Use metadata with a key of X-Goog-Api-Key. See this other answer. If you have API restrictions, you may need additional headers. For example, an iOS example mentioned a bundle id restriction.