Method: projects.locations.authorizations.storeUserAuthorization

Exchanges OAuth authorization credentials for a refresh token and stores the refresh token and the scopes. The stored data will be keyed by the resource name and the user identifier from the end-user credentials.

HTTP request

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

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 contains data with the following structure:

JSON representation
{
  "fullRedirectUri": string
}
Fields
fullRedirectUri

string

Required. The URI the user is redirected to after authorization, including all parameters. E.g., https://example.com/redir?code=5

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.