REST Resource: projects.locations.authorizations

Resource: Authorization

Discovery Engine Authorization resource.

JSON representation
{
  "name": string,
  "displayName": string,

  // Union field authorization_config can be only one of the following:
  "serverSideOauth2": {
    object (ServerSideOAuth2)
  }
  // End of list of possible types for union field authorization_config.
}
Fields
name

string

Identifier. Resource name of the authorization. Format: projects/{project}/locations/{location}/authorizations/{authorization}

It must be a UTF-8 encoded string with a length limit of 1024 characters.

displayName

string

Required. The display name of the authorization.

It must be a UTF-8 encoded string with a length limit of 128 characters.

Union field authorization_config. The authorization configuration. authorization_config can be only one of the following:
serverSideOauth2

object (ServerSideOAuth2)

Server-side OAuth2 configuration.

ServerSideOAuth2

OAuth2 configuration.

JSON representation
{
  "clientId": string,
  "clientSecret": string,
  "tokenUri": string,
  "authorizationUri": string,
  "scopes": [
    string
  ]
}
Fields
clientId

string

Required. The OAuth2 client id.

clientSecret

string

Required. The OAuth2 client secret.

Encrypted at rest.

tokenUri

string

Required. The HTTP endpoint that exchanges a client authorization for an access token.

authorizationUri

string

Required. The URI the user is directed to when they need to authorize. Should include everything required for a successful authorization: OAuth id, extra flags, etc. Example: https://accounts.google.com/o/oauth2/v2/auth?clientId=OAUTH_ID&scope=https://www.googleapis.com/auth/calendar.events&responseType=code&access_type=offline&prompt=consent

The redirectUri parameter will be overwritten by the Vertex AI Search frontend.

scopes[]

string

Required. The scopes to request. Example: https://www.googleapis.com/auth/calendar.events

Methods

acquireUserAuthorization

Uses the stored refresh token for the user identified by their end-user credentials and the given resource, and returns the generated access token and its details.

create

Creates an Authorization.

delete

Deletes an Authorization.

get

Gets an Authorization.

list

Lists all Authorizations under an Engine.

patch

Updates an Authorization

storeUserAuthorization

Exchanges OAuth authorization credentials for a refresh token and stores the refresh token and the scopes.