title: Can't enable billing for a fresh Google Cloud Platform project in Python API
body: <p>The project was created by Python using the google_application_defaults, billing API was successfully activated and checked on command line with </p>
  
  <pre><code>os.system(gcloud services enable cloudbilling.googleapis.com)
  os.system(gcloud services list --enabled)
  </code></pre>
  
  <p>Then, when running:</p>
  
  <pre><code>from googleapiclient import discovery, errors, logging
  CB = discovery.build("cloudbilling", "v1", credentials = default_creds,  cache_discovery = False)   
  billing_body = {"projectID": projectID, "name": "projects/"+projectID+"/billingInfo", "billingEnabled": True, "billingAccountName": "billingAccounts/"+billingAccount}
  billingUP = CB.projects().updateBillingInfo(name = projectID, body = billing_body )
  try:
      billing_resp = billingUP.execute()
      print("Billing succesfully enabled")
  except errors.HttpError as err:
      billing_resp = None
      print("request voided")
      logging.error("There was an error creating the project. Check:")
      logging.error(err._get_reason())
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Cloud Billing API has not been used in project XXXXXXXXXX before or it  is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbilling.googleapis.com/overview?project=XXXXXXXXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
  </code></pre>
  
  <p>I also tried activating it directly on command line outside the python script but the error persist. I've tred using different formats in the "projectID" part on the billingUp request: projectName, projects/projectName, projectID, projects/projectID and nothing works. Any possible solutions?</p>