Method: projects.locations.accountConnectors.users.fetchAccessToken

Fetches OAuth access token based on end user credentials.

HTTP request

POST https://developerconnect.googleapis.com/v1/{accountConnector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
accountConnector

string

Required. The resource name of the AccountConnector in the format projects/*/locations/*/accountConnectors/*.

Request body

The request body must be empty.

Response body

Message for responding to getting an OAuth access token.

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

JSON representation
{
  "token": string,
  "expirationTime": string,
  "scopes": [
    string
  ],
  "exchangeError": {
    object (ExchangeError)
  }
}
Fields
token

string

The token content.

expirationTime

string (Timestamp format)

Expiration timestamp. Can be empty if unknown or non-expiring.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

scopes[]

string

The scopes of the access token.

exchangeError

object (ExchangeError)

The error resulted from exchanging OAuth tokens from the service provider.

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 accountConnector resource:

  • developerconnect.users.fetchAccessToken

For more information, see the IAM documentation.

ExchangeError

Message for representing an error from exchanging OAuth tokens.

JSON representation
{
  "code": string,
  "description": string
}
Fields
code

string

https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error

description

string

https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error_description