My goal is to programmatically create appengine projects and then deploy an app from source control.
I WAS trying to use code I found here: http://google-cloud-python.readthedocs.io/en/latest/resource-manager-api.html
>>> from google.cloud import resource_manager
>>> client = resource_manager.Client()
>>> # List all projects you have access to
>>> for project in client.list_projects():
>>> # Create a new project
>>> new_project = client.new_project('your-project-id-here',
... name='My new project')
operation = crm.projects().create(
'name': 'my project'
That libraries documentation is misleading and also incorrect. It is misleading in telling you that your authentication is handled by using the
gcloud commands. That might work fine for local development or for situations where your run that command ON the actual server running the code, but that is not the case on App Engine. It is incorrect in that Cloud Resource Manager is not in alpha, but rather is generally available for everyone.
You need to set up OAuth client ID credentials in the Cloud Platform Console, and then set up an OAuth login flow where the end user can grant your application access to creating projects on the user's behalf.
Start with the App Engine Admin API documentation for creating applications programmatically.