---
type: api
title: Start OAuth authorization (redirects to the identity provider)
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-actions-connector-connectorid-oauth-start
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-actions-connector-connectorid-oauth-start
products:
  - Kibana
---

# Start OAuth authorization (redirects to the identity provider)

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/actions/connector/{connectorId}/oauth/start`
- `GET` `/s/{space_id}/api/actions/connector/{connectorId}/oauth/start`

#### Path parameters

- `connectorId` (string · max length: 36) — required
  An identifier for the connector.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Required authorization

- Privileges: `actions:oauth`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Responses

#### `302`

Redirects to the identity provider to begin OAuth authorization.

#### `400`

Invalid request, such as a disallowed returnUrl.

#### `401`

User is not authenticated.

#### `404`

Connector not found.

## Code examples

#### Console

```console
GET kbn:/api/actions/connector/CONNECTOR_ID/oauth/start
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/actions/connector/${CONNECTOR_ID}/oauth/start" \
  -H "Authorization: ApiKey ${API_KEY}"
```

