HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_iam_oauth-clients_create.1
.TH "GCLOUD_IAM_OAUTH\-CLIENTS_CREATE" 1



.SH "NAME"
.HP
gcloud iam oauth\-clients create \- create an OAuth client



.SH "SYNOPSIS"
.HP
\f5gcloud iam oauth\-clients create\fR (\fIOAUTH_CLIENT\fR\ :\ \fB\-\-location\fR=\fILOCATION\fR) \fB\-\-allowed\-grant\-types\fR=[\fIALLOWED_GRANT_TYPES\fR,...] \fB\-\-allowed\-redirect\-uris\fR=[\fIALLOWED_REDIRECT_URIS\fR,...] \fB\-\-allowed\-scopes\fR=[\fIALLOWED_SCOPES\fR,...] \fB\-\-client\-type\fR=\fICLIENT_TYPE\fR [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-disabled\fR] [\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Create a new OAuth client.



.SH "EXAMPLES"

The following command creates a disabled OAuth client with ID
\f5\fImy\-oauth\-client\fR\fR in the default project:

.RS 2m
$ gcloud iam oauth\-clients create my\-oauth\-client \e
    \-\-location="global" \-\-client\-type="confidential\-client" \e
    \-\-display\-name="My oauth client" \e
    \-\-description="My oauth client description" \-\-disabled \e
    \-\-allowed\-grant\-types="authorization\-code\-grant,refresh\-token\-gr\e
ant" \e
    \-\-allowed\-scopes="https://www.googleapis.com/auth/cloud\-platform\e
,openid" \-\-allowed\-redirect\-uris="https://example.com"
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Oauth client resource \- The OAuth client to create. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some attributes
are not given arguments in this group but can be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5oauth_client\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fIOAUTH_CLIENT\fR

ID of the oauth client or fully qualified identifier for the oauth client.

To set the \f5oauth_client\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5oauth_client\fR on the command line.
.RE
.sp

This positional argument must be specified if any of the other arguments in this
group are specified.

.TP 2m
\fB\-\-location\fR=\fILOCATION\fR

The location name.

To set the \f5location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5oauth_client\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-location\fR on the command line.
.RE
.sp


.RE
.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-allowed\-grant\-types\fR=[\fIALLOWED_GRANT_TYPES\fR,...]

A list of OAuth grant types that are allowed for the OAuth client.

The following grant types are currently supported:

.RS 2m
.IP "\(em" 2m
\f5authorization\-code\-grant\fR
.RE
.sp

.RS 2m
.IP "\(em" 2m
\f5refresh\-token\-grant\fR
.RE
.sp

.TP 2m
\fB\-\-allowed\-redirect\-uris\fR=[\fIALLOWED_REDIRECT_URIS\fR,...]

A list of redirect uris that is allowed for redirecting when the authorization
is completed.

.TP 2m
\fB\-\-allowed\-scopes\fR=[\fIALLOWED_SCOPES\fR,...]

A list of scopes that the OAuth client is allowed to request during OAuth flows.

The following scopes are currently supported:

.RS 2m
.IP "\(em" 2m
\f5https://www.googleapis.com/auth/cloud\-platform\fR: View, edit, configure,
and delete your Google Cloud data, and view the email address for your Google
Account.
.RE
.sp

.RS 2m
.IP "\(em" 2m
\f5openid\fR: Associate you with your personal info on Google Cloud.
.RE
.sp

.RS 2m
.IP "\(em" 2m
\f5email\fR: The OAuth client can read a federated identity's email address.
.RE
.sp

.RS 2m
.IP "\(em" 2m
\f5groups\fR: The OAuth client can read a federated identity's groups.
.RE
.sp

.TP 2m
\fB\-\-client\-type\fR=\fICLIENT_TYPE\fR

The type of OAuth client. \fICLIENT_TYPE\fR must be one of:
\fBconfidential\-client\fR, \fBpublic\-client\fR.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

A description of the OAuth client. Cannot exceed 256 characters.

.TP 2m
\fB\-\-disabled\fR

Disables the OAuth client. You cannot use a disabled OAuth client for login.
Include \f5\-\-no\-disabled\fR to enable a disabled OAuth client.

.TP 2m
\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR

A display name for the OAuth client. Cannot exceed 32 characters.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "API REFERENCE"

This command uses the \fBiam/v1\fR API. The full documentation for this API can
be found at: https://cloud.google.com/iam/



.SH "NOTES"

This variant is also available:

.RS 2m
$ gcloud alpha iam oauth\-clients create
.RE