title: API dataflow google: workflow could not be created error
body: <p>I try to access a REST API via Postman or SOAPUI and I received "PERMISSION_DENIED" Code "403 forbbiden", but when I test the same method in Google APIs Explorer I receive the code "200 OK"</p>
  
  <p>I tested this method "Services > Dataflow API v1b3 > dataflow.projects.templates.create"; here is the link in the API Explorer: </p>
  
  <p><a href="https://developers.google.com/apis-explorer/?hl=es#p/dataflow/v1b3/dataflow.projects.templates.create" rel="nofollow noreferrer">https://developers.google.com/apis-explorer/?hl=es#p/dataflow/v1b3/dataflow.projects.templates.create</a></p>
  
  <p>When I test this method on this Page I received 200 OK, but when I try to test the same method on SOAPUI, Postman and with other methods I received the next message: </p>
  
  <pre><code>The workflow could not be created. Causes: (947cb6fd5273ed12): Unable
  to get machine type information for machine type n1-standard-1 in zone
  us-central1-f because of insufficient permissions. Please refer to
  https://cloud.google.com/dataflow/access-control#creating_jobs` and
  make sure you have sufficient permissions."
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hX7kT.png" rel="nofollow noreferrer">google api explorer 1</a>
  <a href="https://i.stack.imgur.com/ZQ1oV.png" rel="nofollow noreferrer">google api explorer 2</a></p>
  
  <p>So, I checked the roles for the users permissions on IAM and assigned Owner to all users. But I receive the same error.</p>
  
  <p>For example, if I request the following using APIs Explorer: </p>
  
  <p>POST <a href="https://dataflow.googleapis.com/v1b3/projects/" rel="nofollow noreferrer">https://dataflow.googleapis.com/v1b3/projects/</a>{porjectid}/templates</p>
  
  <pre><code>{
   "jobName": "job_2019-07-22_14:15:24",
   "parameters": {
    "inputLocations": input location,
    "outputLocations": output location
   },
   "environment": {
    "tempLocation": temp location
    "zone": "us-central1-f"
   },
   "gcsPath": path correct
  }
  </code></pre>
  
  <p>I receive:</p>
  
  <p>200</p>
  
  <ul>
  <li>Hide headers -</li>
  </ul>
  
  <p>cache-control:  private
  content-encoding:  gzip
  content-length:  225
  content-type:  application/json; charset=UTF-8
  date:  Mon, 22 Jul 2019 22:53:24 GMT
  server:  ESF
  vary:  Origin, X-Origin, Referer</p>
  
  <pre><code>{
   "id": "2019-07-22_15_53_22-5610507684062605467",
   "projectId": project id,
   "name": "job_2019-07-22_14:15:24",
   "type": "JOB_TYPE_BATCH",
   "currentStateTime": "1970-01-01T00:00:00Z",
   "createTime": "2019-07-22T22:53:24.505713Z",
   "location": "us-central1",
   "startTime": "2019-07-22T22:53:24.505713Z"
  }
  </code></pre>
  
  <p>(Something was deleted intentionally).</p>
  
  <p>When I try to test on postman (for example) I receive:</p>
  
  <p><a href="https://i.stack.imgur.com/5oCWI.png" rel="nofollow noreferrer">postman 1</a>
  <a href="https://i.stack.imgur.com/aG8An.png" rel="nofollow noreferrer">postman 2</a></p>
  
  <pre><code>{
      "error": {
          "code": 403,
          "message": "(9f57a17249c91ca0): The workflow could not be created. Causes: (9f57a17249c9127d): Unable to get machine type information for machine type n1-standard-1 in zone us-central1-f because of insufficient permissions. Please refer to https://cloud.google.com/dataflow/access-control#creating_jobs and make sure you have sufficient permissions.",
          "status": "PERMISSION_DENIED"
      }
  }
  </code></pre>