title: PermissionDenied: 403 IAM permission 'dialogflow.intents.list'
body: <p>I'm trying to get the list of the intents in my Dialogflow agent using Dialogflow's V2 APIs but have been getting the following error:</p>
  
  <hr>
  
  <p><strong>PermissionDenied: 403 IAM permission 'dialogflow.intents.list' on 'projects/xxxx/agent' denied.</strong></p>
  
  <p>I adopted the following steps:</p>
  
  <ol>
  <li>I created a new agent(with V2 APIs enabled) and a new service account for it.</li>
  <li>I downloaded the JSON key and set my GOOGLE_APPLICATION_CREDENTIALS             variable to its path. </li>
  </ol>
  
  <p>Following is my code:</p>
  
  <pre><code>import dialogflow_v2 as dialogflow
  
  os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="/home/user/folder/service-account-key.json"
  
  client=dialogflow.IntentsClient()
  
  parent = client.project_agent_path('[PROJECT_ID]')
  
  for element in client.list_intents(parent):
      pass
  </code></pre>
  
  <p>I have made various agents and service accounts and even changed the role from Admin to Client but can't figure out any solution. I tried the following solution but didnt' work</p>
  
  <p>Tried Solution: <a href="https://stackoverflow.com/questions/51421926/dialogflow-permissiondenied-403-iam-permission-dialogflow-sessions-detectinten">DialogFlow PermissionDenied: 403 IAM permission &#39;dialogflow.sessions.detectIntent&#39;</a></p>