I am trying to access a Google DialogFlow from a Windows Java application. I have the environment variable, GOOGLE_APPLICATION_CREDENTIALS
, properly set and I can call other Google APIs. However, when I call:
DetectIntentResponse response = sessionsClient.detectIntent(session, queryInput);
I receive a grpc exception:
PERMISSION_DENIED: IAM permission 'dialogflow.sessions.detectIntent' on 'projects/newagent-a0ef5/agent' denied.Session Path: projects/NewAgent/agent/sessions/xxxx
"newagent-a0ef5" is the project ID of my flow. "xxxx" is just a random Session ID token.
I understand that I have to enable dialogflow.sessions.detectIntent
access, but I cannot figure out where. I created a custom role with that value and added it to the three IAM accounts associated with my flow. I have also enabled the DialogFlow API.
Does anyone know where I add this missing permission?
I did all the IAM steps properly, but I was passing the wrong Project ID to detectIntent. So I guess a couple things to check...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With