I\'m trying to use the Google Cloud Translation API in my application but whenever I try to translate something it comes up with this missing valid API error.
I\'ve
The error on API key means you didn't create or use the key properly. You need to do the following for the key to work:
1) create a service account [1]
2) create a key for above service account [2]
3) download the key to a location, for example, a local path
4) set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the key, refer to samples in Quickstart tutorial
Doing 1) and 2) in GCP Console, 3) and 4) in Cloud Shell would be the easiest.
[1] https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating_a_service_account
[2] https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys