# Method: projects.locations.accountConnectors.users.startOAuthFlow

- [HTTP request](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.request_body)
- [Response body](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.StartOAuthResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors.users/startOAuthFlow#try-it)

Starts OAuth flow for an account connector.

### HTTP request

`GET https://developerconnect.googleapis.com/v1/{accountConnector=projects/*/locations/*/accountConnectors/*}/users:startOAuthFlow`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) 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 starting an OAuth flow.

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

| JSON representation |
|---|
| ``` { "ticket": string, "codeChallenge": string, "codeChallengeMethod": string, "clientId": string, "scopes": [ string ], "authUri": string, // Union field `id` can be only one of the following: "systemProviderId": enum (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors#SystemProvider`) // End of list of possible types for union field `id`. } ``` |

| Fields ||
|---|---|
| `ticket` | `string` The ticket to be used for post processing the callback from the service provider. |
| `codeChallenge` | `string` Please refer to <https://datatracker.ietf.org/doc/html/rfc7636#section-4.1> |
| `codeChallengeMethod` | `string` Please refer to <https://datatracker.ietf.org/doc/html/rfc7636#section-4.2> |
| `clientId` | `string` The client ID to the OAuth App of the service provider. |
| `scopes[]` | `string` The list of scopes requested by the application. |
| `authUri` | `string` The authorization server URL to the OAuth flow of the service provider. |
| Union field `id`. The ID of the service provider. `id` can be only one of the following: ||
| `systemProviderId` | ``enum (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.accountConnectors#SystemProvider`)`` The ID of the system provider. |

### Authorization scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `accountConnector` resource:

- `developerconnect.users.startOAuth`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).