- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- AdditionalOAuthResponse
Exchanges OAuth authorization credentials for a refresh token and stores the refresh token and the scopes. The stored data will be keyed by the connector name and the user identifier from the EUC.
HTTP request
POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:acquireAndStoreRefreshToken
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. Connector resource. The connector name identifies the 3rd party system to use for authorization. It is also used as a key to store the refresh token. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "scopes": [ string ], "fullRedirectUri": string } |
Fields | |
---|---|
scopes[] |
The scopes of the authorization code and the refresh token. |
fullRedirectUri |
Required. The URI the user is redirected to after authorization, including all parameters. E.g., |
Response body
Response message for DataConnectorService.AcquireAndStoreRefreshToken
method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"additionalOauthResponses": [
{
object ( |
Fields | |
---|---|
additionalOauthResponses[] |
Optional. Additional OAuth responses from the authorization response. This field is optional and will not always be populated. It depends on the connector's type and the authorization response. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
discoveryengine.dataConnectors.acquireAndStoreRefreshToken
For more information, see the IAM documentation.
AdditionalOAuthResponse
Additional OAuth responses from the authorization response.
JSON representation |
---|
{ "key": string, // Union field |
Fields | |
---|---|
key |
The key of the additional OAuth response. |
Union field value . The value of the additional OAuth response. value can be only one of the following: |
|
stringValue |
The string value of the additional OAuth response. |
intValue |
The integer value of the additional OAuth response. |
boolValue |
The boolean value of the additional OAuth response. |