issues with the project id #5930
Unanswered
nicktackes
asked this question in
Q&A
Replies: 2 comments
|
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? |
0 replies
|
I'd be willing to bet you have some authentication default credentials that are being used over the project you're providing. Please read the documentation on authentication to better troubleshoot your environment. As a way of testing, please remove any automatic login: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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});
All reactions