I am trying to detect an intent using the following code in nodeJS:
const session=new dialogflow.SessionsClient({ project_id:"activity3-viod", keyFilename:"assets/keys/dialogflow.json" });
const sessionPath = session.projectLocationAgentSessionPath("activity3-viod","us-central1","Test-CX","123456789");
const request = { session: sessionPath, queryInput:{ text: { text: "sample phrase", languageCode:"en-US" }}};
const responses = await session.detectIntent(request);
I get the following error:
Error: 3 INVALID_ARGUMENT: Please switch to 'us-central1-dialogflow.googleapis.com' to access resources located in 'us-central1'.
The project is indeed us-centra11 and I think the id and agent names are right. They are what DF says on the site. I thought I was addressing us-centra11?