Unable to create knowledge base in dialog flow using python dialogflow client.
Given admin permission for dialogflow in IAM service accounts.
I have given the Dialogflow Admin Role to the client mail I'm using.
I used a json key generated for a service account and exported it as an environmental variable
this is the code I used:
import dialogflow_v2beta1 as dialogflow
client = dialogflow.KnowledgeBasesClient()
project_path = client.project_path(project_id)
knowledge_base = dialogflow.types.KnowledgeBase(
display_name=display_name)
response = client.create_knowledge_base(project_path, knowledge_base)
I'm able to create/delete/list a document inside already created Knowledge base but creating a knowledge base throws this error
error: google.api_core.exceptions.PermissionDenied: 403 IAM permission 'dialogflow.knowledgeBases.create' on 'projects/api_test2' denied