issues with the project id #5930
Unanswered
nicktackes
asked this question in
Q&A
Replies: 1 comment
-
can i use an api key to call the api? seems pretty difficult to figure out all of the myriad of mechanisms to connect although the project id doesnt seem very easy to use? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using the simple example for cloud translation, I provide a project id for a billable project where cloud translate api is enabled. I unfortunately get an error message indicating that my project has not enabled the cloud translation api. The project in the error message is not my project!! The id i provided is something different. In my google cloud console, i have an organization with multiple projects. The id is a generated id with words and numbers, which as you can see doesnt match the project in the error.
Any ideas why the project id would change from request to response?
const projectId = "my project id"
// Imports the Google Cloud client library
const {Translate} = require('@google-cloud/translate').v2;
// Instantiates a client
const translate = new Translate({projectId});
Beta Was this translation helpful? Give feedback.
All reactions