---
title: "🔓 Авторизация пользователя по телефону или email и 4-значному коду (#26729). Новый контакт - пользователь-черновик с подтверждённым контактом. Email входит только подтверждённый: ввёл администратор, а владелец не подтверждал - 403 email_not_confirmed."
method: GET
path: "/signin/auth"
tags: ["Auth"]
---

# 🔓 Авторизация пользователя по телефону или email и 4-значному коду (#26729). Новый контакт - пользователь-черновик с подтверждённым контактом. Email входит только подтверждённый: ввёл администратор, а владелец не подтверждал - 403 email_not_confirmed.

`GET /signin/auth`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/signin/auth`
- Auth: none required

Авторизация пользователя по телефону или email и 4-значному коду (#26729). Новый контакт - пользователь-черновик с подтверждённым контактом. Email входит только подтверждённый: ввёл администратор, а владелец не подтверждал - 403 email_not_confirmed.

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

### TypeScript (copy-paste)

**`GET /signin/auth`**

<details open><summary><b>Params</b></summary>

```typescript
export interface SigninAuthParams {
  phone?: string | null
  email?: string | null
  code: number
}
```

</details>

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

```typescript
export type SigninAuthResponse = IServerResponse<Resp_signin_auth>

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)

## Query parameters

- `phone` string, nullable
- `email` string, nullable
- `code` integer, required

## Headers

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

## Response `200`

OK — `IServerResponse<Resp_signin_auth>`

- object
  - `code` integer, required
  - `data` RespSigninAuth, required: ResponseData for signin/auth
    - `session` AuthSession: Stub schema for unresolved $ref AuthSession (from ResponseData AST)
    - `currentUser` UserDto: Entity `User` (table: User )
      - `ID` string, uuid, required
      - `phone` string, nullable: Phone number
      - `email` string, nullable
      - `auth` object, nullable
      - `avatarFID` string, uuid, required
      - `firstName` string, required
      - `lastName` string, required
      - `patronymic` string, nullable
      - `gender` 'male' | 'female': `male` = "male", `female` = "female"
      - `contactInfo` string, nullable
      - `dateOfBirth` string, date-time, nullable
      - `address` object, nullable
        - `country` string, nullable
        - `city` string, nullable
        - `streetAddress` string, nullable
      - `timeZone` string, nullable
      - `meetingInfo` object, nullable
        - `zoomEmail` string, nullable
      - `position` string, nullable
      - `hourCost` number, required
      - `docsEmployment` object, nullable
      - `docsLibrary` object, nullable
      - `isDraft` boolean, required
      - `createDT` string, date-time, required
      - `createdUID` string, required
      - `updTS` integer, required: Unix timestamp in milliseconds
      - `updUID` string, required
    - `company` Company: Entity `Company` (table: Company )
      - `ID` string, uuid, required
      - `title` string, required
      - `logoFID` string, uuid, nullable
      - `phone` string, required
      - `email` string, required
      - `url` string, required
      - `description` string, required
      - `address` string, required
      - `foundationDT` string, date-time, nullable
      - `country` string, nullable
      - `defaultMarginPercent` integer, nullable
      - `demoSet` string, nullable
      - `testSlot` integer, nullable
      - `agentPrices` object, nullable
      - `docs` object, nullable
        - `INN` string, uuid, nullable
        - `other1` string, uuid, nullable
        - `other2` string, uuid, nullable
        - `requisites` string, uuid, nullable
      - `timeZone` string
      - `language` string, nullable
      - `activityType` unknown[], nullable
        - unknown
      - `activityDescription` string, nullable
      - `titleHash` string, required
      - `updTS` integer, required: Unix timestamp in milliseconds
      - `updUID` string, required
      - `createDT` string, date-time, required
      - `createUID` string, required
    - `dictionaries` CompanyDictionary: Stub schema for unresolved $ref Company_Dictionary (from ResponseData AST)
    - `availableCompanies` CompanyItem[], nullable
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `403`: AccessNotAllowed: params.code - code_wrong (code does not match), email_not_confirmed
- `404`: NotFound: params.code - code_not_found (code was not requested or has expired)
- `422`: UnprocessableContent: params.code - code_attempts_exceeded, code_daily_exceeded, code_ip_blocked

---

[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)
