# OAuth app (BYOA) status for a catalog connector

> Source: https://docs.clonepartner.com/api-reference/connectors/get-connector-oauth-app/

`GET /api/connectors/{id}/oauth-app`

Returns whether the catalog integration needs a customer OAuth app
(`client.id === "dummy"`) and whether one is already configured on Saffron.
Never returns the client secret.

**Operation ID:** `getConnectorOAuthApp`

## Authentication

### Option 1

- **BearerAuth** (`http bearer`)
  API key token. Create via POST /api/api-keys. Format: `envoy_<hex>`

### Option 2

- **CookieAuth** (`apiKey`)
  Session cookie set after login + TOTP verification

## Path parameters

- `id` — `integer`, `required`
  Resource ID

## Success responses

### 200

Status

**Content type:** `application/json`

- Type: `object`
- Properties:
  - `needs_byoa` (`boolean`, `required`)
  - `configured` (`boolean`, `required`)
  - `oauth_app_mode` (`string | null`)
    - Allowed values: `platform_default`, `byoa`
    - Nullable: yes
  - `client_id` (`string`)
  - `format` (`string | null`)
    - Nullable: yes
  - `installed_integration_id` (`string`)

## Error responses

### 400

Unsupported connector type


### 404

Resource not found

**Content type:** `application/json`

- Reference: `Error`
  - Type: `object`
  - Properties:
    - `error` (`string`)
      - Example: `NOT_FOUND`
    - `message` (`string`)
      - Example: `Resource not found`

Example:

```json
{
  "error": "NOT_FOUND",
  "message": "Resource not found"
}
```

## Examples

### cURL

```bash
curl --request GET \
  --url 'https://your-envoy.example.com/api/connectors/YOUR_ID/oauth-app' \
  --header 'Authorization: Bearer $API_KEY'
```

### JavaScript (fetch)

```javascript
const response = await fetch('https://your-envoy.example.com/api/connectors/YOUR_ID/oauth-app', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  },
});

if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);
```
