Required. The parent resource to create the OauthClient in. The only supported location is global.
Query parameters
Parameters
oauthClientId
string
Required. The ID to use for the OauthClient, which becomes the final component of the resource name. This value should be a string of 6 to 63 lowercase letters, digits, or hyphens. It must start with a letter, and cannot have a trailing hyphen. The prefix gcp- is reserved for use by Google, and may not be specified.
Request body
The request body contains an instance of OauthClient.
Response body
If successful, the response body contains a newly created instance of OauthClient.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-21 UTC."],[[["\u003cp\u003eThis page details how to create a new OauthClient, which must be done using a POST request to a specific URL structure.\u003c/p\u003e\n"],["\u003cp\u003eThe URL requires a \u003ccode\u003eparent\u003c/code\u003e path parameter, specifying the resource location as \u003ccode\u003eglobal\u003c/code\u003e, and the request must include an \u003ccode\u003eoauthClientId\u003c/code\u003e query parameter following specific formatting rules.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain an instance of an OauthClient, while a successful response will return a newly created instance of the same.\u003c/p\u003e\n"],["\u003cp\u003eCreating a new OauthClient requires one of the specified OAuth scopes for authorization, detailed on the Authentication Overview.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.oauthClients.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nCreates a new [OauthClient](/iam/docs/reference/rest/v1/projects.locations.oauthClients#OauthClient).\n\nYou cannot reuse the name of a deleted [OauthClient](/iam/docs/reference/rest/v1/projects.locations.oauthClients#OauthClient) until 30 days after deletion.\n\n### HTTP request\n\n`POST https://iam.googleapis.com/v1/{parent=projects/*/locations/*}/oauthClients`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [OauthClient](/iam/docs/reference/rest/v1/projects.locations.oauthClients#OauthClient).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [OauthClient](/iam/docs/reference/rest/v1/projects.locations.oauthClients#OauthClient).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/iam`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]