Method: projects.locations.authorizations.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. Takes the access token from cache if available. Rotates the stored refresh token if needed.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/authorizations/*}:acquireUserAuthorization

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

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

Request body

The request body must be empty.

Response body

Response message for the [AuthorizationService.AcquireAuthorization][] method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "refreshTokenInfo": {
    object (RefreshTokenInfo)
  },
  "accessToken": string,
  "authorizationUri": string
}
Fields
refreshTokenInfo

object (RefreshTokenInfo)

Info about the stored refresh token used to create the access token.

accessToken

string

The created access token.

authorizationUri

string

A URI, that triggers the authorization flow. Set when the user needs to be (re)authorized.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

RefreshTokenInfo

Describes a refresh token.

JSON representation
{
  "scopes": [
    string
  ]
}
Fields
scopes[]

string

The list of scopes for this token.