I'm trying to use the Google Cloud web API to create an App in App Engine as described in the official documentation (https://cloud.google.com/appengine/docs/admin-api/creating-an-application). I use:
- A valid OAuth token with the valid scopes (https://www.googleapis.com/auth/cloud-platform and https://www.googleapis.com/auth/appengine.admin).
- I've enabled the App Engine API.
- I have a valid ProjectId with no App Engine yet.
When I do an HTTP POST using node-fetch
as follow:
fetch('https://appengine.googleapis.com/v1/apps', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
},
body: JSON.stringify({
id: projectId,
locationId:'australia-southeast1'
})
})
Then I receive this error message:
{
"code": 409,
"message": "This application already exists and cannot be re-created.",
"status": "ALREADY_EXISTS"
}
It's really weird as my project id as no App Engine defined yet.
Does anyone know what's happening here?