Hsein Bitar
Hsein Bitar

Reputation: 7

A way to automate project creation on GCP or make the OAuth Google workflow create one project per user?

I am working on a wordpress plugin integration with google calendar. Ideally I want to an easier way for the admin to get their Client ID and Client Secret. Going to the GCP console and such is painful.

I am seeking the following in particular:

Documentation does not seem to consider this use case. Any alternative approaches to going to the console and creating the project step by step?

Upvotes: 0

Views: 172

Answers (1)

Rathish Kumar B
Rathish Kumar B

Reputation: 1412

One option is to use Cloud Resource Manager API You need to build the logics to automate the project creation.

You can start from here Creating and managing projects.

Project creation request example:

POST https://cloudresourcemanager.googleapis.com/v3/projects/
Authorization: *************
Content-Type: application/json

{
    "projectId": "our-project-123",
    "name": "my project",
    "labels": {
      "mylabel": "prod"
    }
}

I don't think, there is a pre-built custom solution for your use case, the above API documents will help you hit the ground.

Upvotes: 2

Related Questions