Reputation: 7
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:
either an automated way they can create their project with their parameters ( think domain name )
or an authorization flow where the consent screen can create a project for that email, and then return the Client ID and Client Secret.
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
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