---
title: "🔒 #26854 Выпуск OAuth-клиента с секретом для платформы без DCR (Gemini Enterprise): Client ID и Client Secret (один раз)."
method: POST
path: "/oauth/client/create"
tags: ["Auth"]
---

# 🔒 #26854 Выпуск OAuth-клиента с секретом для платформы без DCR (Gemini Enterprise): Client ID и Client Secret (один раз).

`POST /oauth/client/create`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/oauth/client/create`
- Auth: API key in header `sid` and API key in header `rts` and API key in header `sig`

#26854 Выпуск OAuth-клиента с секретом для платформы без DCR (Gemini Enterprise): Client ID и Client Secret (один раз).

**Access:** `authorized` (10 ) · **Scope:** `write` · **только веб-сессия**

**Allows:** `company:llm` (все обязательны; без ресурса)

### TypeScript (copy-paste)

**`POST /oauth/client/create`**

<details open><summary><b>Body</b></summary>

```typescript
export interface OauthClientCreateBody {
  name: string
  redirectUri: string
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type OauthClientCreateResponse = IServerResponse<Resp_oauth_client_create>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Request body

- OauthClientCreateBody: JSON body for `oauth/client/create`
  - `name` string, required
  - `redirectUri` string, required

## Response `200`

OK — `IServerResponse<Resp_oauth_client_create>`

- object
  - `code` integer, required
  - `data` RespOauthClientCreate, required: ResponseData for oauth/client/create
    - `client` OAuthClientsServiceDto, required: Stub schema for unresolved $ref OAuthClientsServiceDto (from ResponseData AST)
    - `clientSecret` string, required: Секрет клиента - показывается один раз, в БД только его хэш
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `401`: Authorize — сессия отсутствует, истекла или невалидна
- `403`: AccessNotAllowed: Privilege company:llm required
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: params.code - name_required, invalid_redirect_uri (https only, no credentials and fragment)

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
