how to create a oauth client id for gcp programmatically

It seems that no API from Google can manage OAuth client ID or Credentials related configuration.

I've not found any on API Library and many other questions related to this give the same answer (can't manage API Key for example).

If you're a Terraform user, they're an open issue on Google Provider: https://github.com/terraform-providers/terraform-provider-google/issues/1287


As of terraform-provider-google version 3.15, you can do this using the google_iap_client resource:

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/iap_client


resource "google_iap_brand" "project_brand" {
  support_email     = "[email protected]"
  application_title = "Cloud IAP protected Application"
  project           = google_project_service.project_service.project
}

resource "google_iap_client" "project_client" {
  display_name = "Test Client"
  brand        =  google_iap_brand.project_brand.name
}